public final class SingletonHeaders
extends java.lang.Object
implements org.dmfs.httpessentials.headers.Headers
Headers that contain a single Header only.| Constructor and Description |
|---|
SingletonHeaders(org.dmfs.httpessentials.headers.Header<?> header)
Creates
Headers containing a single Header. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(org.dmfs.httpessentials.headers.HeaderType<?> headerType) |
<T> org.dmfs.httpessentials.headers.Header<java.util.List<T>> |
header(org.dmfs.httpessentials.headers.ListHeaderType<T> headerType) |
<T> org.dmfs.httpessentials.headers.Header<T> |
header(org.dmfs.httpessentials.headers.SingletonHeaderType<T> headerType) |
java.util.Iterator<org.dmfs.httpessentials.headers.Header<?>> |
iterator() |
<T> org.dmfs.httpessentials.headers.Headers |
withHeader(org.dmfs.httpessentials.headers.Header<T> header) |
<T> org.dmfs.httpessentials.headers.Headers |
withoutHeaderType(org.dmfs.httpessentials.headers.HeaderType<T> headerType) |
public SingletonHeaders(org.dmfs.httpessentials.headers.Header<?> header)
Headers containing a single Header.header - The Header of this Headers object.public java.util.Iterator<org.dmfs.httpessentials.headers.Header<?>> iterator()
iterator in interface java.lang.Iterable<org.dmfs.httpessentials.headers.Header<?>>public boolean contains(org.dmfs.httpessentials.headers.HeaderType<?> headerType)
contains in interface org.dmfs.httpessentials.headers.Headerspublic <T> org.dmfs.httpessentials.headers.Header<T> header(org.dmfs.httpessentials.headers.SingletonHeaderType<T> headerType)
header in interface org.dmfs.httpessentials.headers.Headerspublic <T> org.dmfs.httpessentials.headers.Header<java.util.List<T>> header(org.dmfs.httpessentials.headers.ListHeaderType<T> headerType)
header in interface org.dmfs.httpessentials.headers.Headerspublic <T> org.dmfs.httpessentials.headers.Headers withHeader(org.dmfs.httpessentials.headers.Header<T> header)
withHeader in interface org.dmfs.httpessentials.headers.Headerspublic <T> org.dmfs.httpessentials.headers.Headers withoutHeaderType(org.dmfs.httpessentials.headers.HeaderType<T> headerType)
withoutHeaderType in interface org.dmfs.httpessentials.headers.Headers