| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(HeaderType<?> headerType)
Returns whether these Headers contain a
Header of the given HeaderType. |
<T> Header<java.util.List<T>> |
header(ListHeaderType<T> headerType)
Returns the value of the header of the given
ListHeaderType. |
<T> Header<T> |
header(SingletonHeaderType<T> headerType)
Returns the value of the header of the given
SingletonHeaderType. |
<T> Headers |
withHeader(Header<T> header)
Returns
Headers that contain the given header. |
<T> Headers |
withoutHeaderType(HeaderType<T> headerType)
Removes any header of the given
HeaderType and returns the resulting Headers. |
boolean contains(HeaderType<?> headerType)
Header of the given HeaderType.headerType - <T> Header<T> header(SingletonHeaderType<T> headerType)
SingletonHeaderType.headerType - The HeaderType to look for.Iterator of Headers, may be empty, but never null.java.util.NoSuchElementException - if no such header exists within these Headers.<T> Header<java.util.List<T>> header(ListHeaderType<T> headerType)
ListHeaderType.headerType - The HeaderType to look for.Iterator of Headers, may be empty, but never null.java.util.NoSuchElementException - if no such header exists within these Headers.<T> Headers withHeader(Header<T> header)
Headers that contain the given header. If another header of the same type already exists in this object, it is overridden with the new
header.header - The header to add.Headers that contain the given header.<T> Headers withoutHeaderType(HeaderType<T> headerType)
HeaderType and returns the resulting Headers.headerType - The HeaderType of the headers to remove.Headers that don't contain any header of the given type.