this object.
Headers;
| Modifier and Type | Class and Description |
|---|---|
| protected static class | |
| private class | |
| public static interface | |
| private class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private final DefaultHeaders. | |
| pack-priv static final int | HASH_CODE_SEED
Constant used to seed the hash code generation. |
| private final HashingStrategy | |
| private final byte | |
| protected final DefaultHeaders. | |
| private final DefaultHeaders. | |
| pack-priv int | |
| private final ValueConverter | |
| private final DefaultHeaders. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | DefaultHeaders(HashingStrategy<K> nameHashingStrategy, ValueConverter<V> valueConverter, DefaultHeaders.
|
| public | DefaultHeaders(HashingStrategy<K>
Used to hash and equality compare names. nameHashingStrategy, ValueConverter<V> Used to convert values to/from native types. valueConverter, DefaultHeaders.Used to validate name elements. nameValidator,A hint as to how large the hash data structure should be.
The next positive power of two will be used. An upper bound may be enforced. arraySizeHint)Create a new instance. |
| public | DefaultHeaders(HashingStrategy<K>
Used to hash and equality compare names. nameHashingStrategy, ValueConverter<V> Used to convert values to/from native types. valueConverter, DefaultHeaders.Used to validate name elements. nameValidator,A hint as to how large the hash data structure should be.
The next positive power of two will be used. An upper bound may be enforced. arraySizeHint, DefaultHeaders.The validation strategy for entry values. valueValidatorCreate a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public T | add(K
the name of the header name, V the value of the header value)Implements io. name and value.
|
| public T | add(K
the header name name, Iterable<? extends V> the values of the header values)Implements io. name and values.
|
| public T | add(K
the header name name, V... the values of the header values)Implements io. name and values.
|
| public T | add(Headers<? extends K, ? extends V, ?> headers)
Implements io. headers to this object.
|
| private void | |
| public T | addBoolean(K
the header name name, boolean the value of the header value)Implements io. |
| public T | addByte(K
the header name name, byte the value of the header value)Implements io. |
| public T | addChar(K
the header name name, char the value of the header value)Implements io. |
| public T | addDouble(K
the header name name, double the value of the header value)Implements io. |
| public T | addFloat(K
the header name name, float the value of the header value)Implements io. |
| protected void | |
| public T | addInt(K
the header name name, int the value of the header value)Implements io. |
| public T | addLong(K
the header name name, long the value of the header value)Implements io. |
| public T | addObject(K
the header name name, Object the value of the header value)Implements io. |
| public T | addObject(K
the header name name, Iterable<?> the value of the header values)Implements io. |
| public T | addObject(K
the header name name, Object... the value of the header values)Implements io. |
| public T | addShort(K
the header name name, short the value of the header value)Implements io. |
| public T | addTimeMillis(K
the header name name, long the value of the header value)Implements io. |
| public T | |
| public boolean | contains(K
the header name name)Implements io. true if a header with the name exists, false otherwise.
|
| public boolean | contains(K
the header name name, V the header value of the header to find value)Implements io. true if a header with the name and value exists, false otherwise.
|
| public final boolean | |
| public boolean | containsBoolean(K
the header name name, boolean the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsByte(K
the header name name, byte the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsChar(K
the header name name, char the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsDouble(K
the header name name, double the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsFloat(K
the header name name, float the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsInt(K
the header name name, int the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsLong(K
the header name name, long the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsObject(K
the header name name, Object the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsShort(K
the header name name, short the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsTimeMillis(K
the header name name, long the header value value)Implements io. true if a header with the name and value exists.
|
| public DefaultHeaders | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public final boolean | Returns: true if this object equals h2 given valueHashingStrategy.
false otherwise.The object to check equality for. h2, HashingStrategy<V> Defines how values will be compared for equality. valueHashingStrategy)Test this object for equality against |
| private V | |
| private V | |
| private V | |
| private V | |
| private V | |
| private V | |
| private V | |
| private V | |
| private V | |
| private V | |
| public V | get(K
the name of the header to retrieve name)Implements io. |
| public V | get(K
the name of the header to retrieve name, V the default value defaultValue)Implements io. |
| public List | getAll(K
the name of the header to retrieve name)Implements io. |
| public List | getAllAndRemove(K
the name of the header to retrieve name)Implements io. |
| public V | getAndRemove(K
the name of the header to retrieve name)Implements io. |
| public V | getAndRemove(K
the name of the header to retrieve name, V the default value defaultValue)Implements io. |
| public Boolean | getBoolean(K
the name of the header to retrieve name)Implements io. boolean value of a header with the specified name.
|
| public boolean | getBoolean(K
the name of the header to retrieve name, boolean the default value defaultValue)Implements io. boolean value of a header with the specified name.
|
| public Boolean | getBooleanAndRemove(K
the name of the header to retrieve name)Implements io. boolean value of a header with the specified name and removes the header from this
object.
|
| public boolean | getBooleanAndRemove(K
the name of the header to search name, boolean the default value defaultValue)Implements io. boolean value of a header with the specified name and removes the header from this
object.
|
| public Byte | getByte(K
the name of the header to retrieve name)Implements io. byte value of a header with the specified name.
|
| public byte | getByte(K
the name of the header to retrieve name, byte the default value defaultValue)Implements io. byte value of a header with the specified name.
|
| public Byte | getByteAndRemove(K
the name of the header to search name)Implements io. byte value of a header with the specified name and removes the header from this
object.
|
| public byte | getByteAndRemove(K
the name of the header to search name, byte the default value defaultValue)Implements io. byte value of a header with the specified name and removes the header from this
object.
|
| public Character | getChar(K
the name of the header to retrieve name)Implements io. char value of a header with the specified name.
|
| public char | getChar(K
the name of the header to retrieve name, char the default value defaultValue)Implements io. char value of a header with the specified name.
|
| public Character | getCharAndRemove(K
the name of the header to search name)Implements io. char value of a header with the specified name and removes the header from this
object.
|
| public char | getCharAndRemove(K
the name of the header to search name, char the default value defaultValue)Implements io. char value of a header with the specified name and removes the header from this
object.
|
| public Double | getDouble(K
the name of the header to retrieve name)Implements io. double value of a header with the specified name.
|
| public double | getDouble(K
the name of the header to retrieve name, double the default value defaultValue)Implements io. double value of a header with the specified name.
|
| public Double | getDoubleAndRemove(K
the name of the header to search name)Implements io. double value of a header with the specified name and removes the header from this
object.
|
| public double | getDoubleAndRemove(K
the name of the header to search name, double the default value defaultValue)Implements io. double value of a header with the specified name and removes the header from this
object.
|
| public Float | getFloat(K
the name of the header to retrieve name)Implements io. float value of a header with the specified name.
|
| public float | getFloat(K
the name of the header to retrieve name, float the default value defaultValue)Implements io. float value of a header with the specified name.
|
| public Float | getFloatAndRemove(K
the name of the header to search name)Implements io. float value of a header with the specified name and removes the header from this
object.
|
| public float | getFloatAndRemove(K
the name of the header to search name, float the default value defaultValue)Implements io. float value of a header with the specified name and removes the header from this
object.
|
| public Integer | getInt(K
the name of the header to retrieve name)Implements io. int value of a header with the specified name.
|
| public int | getInt(K
the name of the header to retrieve name, int the default value defaultValue)Implements io. int value of a header with the specified name.
|
| public Integer | getIntAndRemove(K
the name of the header to search name)Implements io. int value of a header with the specified name and removes the header from this
object.
|
| public int | getIntAndRemove(K
the name of the header to search name, int the default value defaultValue)Implements io. int value of a header with the specified name and removes the header from this
object.
|
| public Long | getLong(K
the name of the header to retrieve name)Implements io. long value of a header with the specified name.
|
| public long | getLong(K
the name of the header to retrieve name, long the default value defaultValue)Implements io. long value of a header with the specified name.
|
| public Long | getLongAndRemove(K
the name of the header to search name)Implements io. long value of a header with the specified name and removes the header from this
object.
|
| public long | getLongAndRemove(K
the name of the header to search name, long the default value defaultValue)Implements io. long value of a header with the specified name and removes the header from this
object.
|
| public Short | getShort(K
the name of the header to retrieve name)Implements io. short value of a header with the specified name.
|
| public short | getShort(K
the name of the header to retrieve name, short the default value defaultValue)Implements io. short value of a header with the specified name.
|
| public Short | getShortAndRemove(K
the name of the header to search name)Implements io. short value of a header with the specified name and removes the header from this
object.
|
| public short | getShortAndRemove(K
the name of the header to search name, short the default value defaultValue)Implements io. short value of a header with the specified name and removes the header from this
object.
|
| public Long | getTimeMillis(K
the name of the header to retrieve name)Implements io. |
| public long | getTimeMillis(K
the name of the header to retrieve name, long the default value defaultValue)Implements io. |
| public Long | getTimeMillisAndRemove(K
the name of the header to retrieve name)Implements io. name in milliseconds and removes the header from this
object.
|
| public long | getTimeMillisAndRemove(K
the name of the header to retrieve name, long the default value defaultValue)Implements io. name in milliseconds and removes the header from this
object.
|
| public int | |
| public final int | hashCode(HashingStrategy<V>
Defines how values will be hashed. valueHashingStrategy)Generate a hash code for this object given a |
| private int | |
| public boolean | |
| public Iterator | iterator()
Implements io. T.
|
| public Set | names()
Implements io. Set of all header names in this object.
|
| protected DefaultHeaders. | |
| protected DefaultHeaders. | |
| public boolean | remove(K
the header name name)Implements io. name.
|
| private V | Returns: the first value inserted whose hash code equalsh and whose name is equal to name.
|
| pack-priv DefaultHeaders. | |
| public T | set(K
the header name name, V the value of the header value)Implements io. |
| public T | set(K
the header name name, Iterable<? extends V> the value of the header values)Implements io. |
| public T | set(K
the header name name, V... the value of the header values)Implements io. |
| public T | set(Headers<? extends K, ? extends V, ?> headers)
Implements io. headers.
|
| public T | setAll(Headers<? extends K, ? extends V, ?>
The headers used to headers)set(K, V) values in this instanceImplements io. set(K, V) for each entry in headers.
|
| public T | setBoolean(K
The name to modify name, boolean The value value)Implements io. name to value.
|
| public T | setByte(K
The name to modify name, byte The value value)Implements io. name to value.
|
| public T | setChar(K
The name to modify name, char The value value)Implements io. name to value.
|
| public T | setDouble(K
The name to modify name, double The value value)Implements io. name to value.
|
| public T | setFloat(K
The name to modify name, float The value value)Implements io. name to value.
|
| public T | setInt(K
The name to modify name, int The value value)Implements io. name to value.
|
| public T | setLong(K
The name to modify name, long The value value)Implements io. name to value.
|
| public T | setObject(K
the header name name, Object the value of the header value)Implements io. |
| public T | setObject(K
the header name name, Iterable<?> the values of the header values)Implements io. |
| public T | setObject(K
the header name name, Object... the values of the header values)Implements io. |
| public T | setShort(K
The name to modify name, short The value value)Implements io. name to value.
|
| public T | setTimeMillis(K
The name to modify name, long The value value)Implements io. name to value.
|
| public int | size()
Implements io. |
| private T | |
| private boolean | |
| private byte | |
| private char | |
| private double | |
| private float | |
| private int | |
| private long | |
| private short | |
| public String | |
| private long | |
| protected void | validateName(DefaultHeaders.
the validator to use validator,true if this validation is for adding to the headers, or false if this is for
setting (overwriting) the given header.the name to validate. name)Call out to the given |
| protected void | |
| protected ValueConverter | |
| public Iterator | valueIterator(K
the name of the header to retrieve name)Equivalent to |
| protected DefaultHeaders. |