K - the type of the header name.V - the type of the header value.T - the type to use for return values when the intention is to return this object.public class DefaultHeaders<K,V,T extends Headers<K,V,T>> extends java.lang.Object implements Headers<K,V,T>
Headers;| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
DefaultHeaders.HeaderEntry<K,V> |
static interface |
DefaultHeaders.NameValidator<K> |
static interface |
DefaultHeaders.ValueValidator<V> |
| 限定符和类型 | 字段和说明 |
|---|---|
protected DefaultHeaders.HeaderEntry<K,V> |
head |
| 构造器和说明 |
|---|
DefaultHeaders(HashingStrategy<K> nameHashingStrategy,
ValueConverter<V> valueConverter) |
DefaultHeaders(HashingStrategy<K> nameHashingStrategy,
ValueConverter<V> valueConverter,
DefaultHeaders.NameValidator<K> nameValidator) |
DefaultHeaders(HashingStrategy<K> nameHashingStrategy,
ValueConverter<V> valueConverter,
DefaultHeaders.NameValidator<K> nameValidator,
int arraySizeHint)
Create a new instance.
|
DefaultHeaders(HashingStrategy<K> nameHashingStrategy,
ValueConverter<V> valueConverter,
DefaultHeaders.NameValidator<K> nameValidator,
int arraySizeHint,
DefaultHeaders.ValueValidator<V> valueValidator)
Create a new instance.
|
DefaultHeaders(ValueConverter<V> valueConverter) |
DefaultHeaders(ValueConverter<V> valueConverter,
DefaultHeaders.NameValidator<K> nameValidator) |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
add(Headers<? extends K,? extends V,?> headers)
Adds all header names and values of
headers to this object. |
T |
add(K name,
java.lang.Iterable<? extends V> values)
Adds new headers with the specified
name and values. |
T |
add(K name,
V... values)
Adds new headers with the specified
name and values. |
T |
add(K name,
V value)
Adds a new header with the specified
name and value. |
T |
addBoolean(K name,
boolean value)
Adds a new header.
|
T |
addByte(K name,
byte value)
Adds a new header.
|
T |
addChar(K name,
char value)
Adds a new header.
|
T |
addDouble(K name,
double value)
Adds a new header.
|
T |
addFloat(K name,
float value)
Adds a new header.
|
protected void |
addImpl(Headers<? extends K,? extends V,?> headers) |
T |
addInt(K name,
int value)
Adds a new header.
|
T |
addLong(K name,
long value)
Adds a new header.
|
T |
addObject(K name,
java.lang.Iterable<?> values)
Adds a new header with the specified name and values.
|
T |
addObject(K name,
java.lang.Object... values)
Adds a new header with the specified name and values.
|
T |
addObject(K name,
java.lang.Object value)
Adds a new header.
|
T |
addShort(K name,
short value)
Adds a new header.
|
T |
addTimeMillis(K name,
long value)
Adds a new header.
|
T |
clear()
Removes all headers.
|
boolean |
contains(K name)
Returns
true if a header with the name exists, false otherwise. |
boolean |
contains(K name,
V value)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(K name,
V value,
HashingStrategy<? super V> valueHashingStrategy) |
boolean |
containsBoolean(K name,
boolean value)
Returns
true if a header with the name and value exists. |
boolean |
containsByte(K name,
byte value)
Returns
true if a header with the name and value exists. |
boolean |
containsChar(K name,
char value)
Returns
true if a header with the name and value exists. |
boolean |
containsDouble(K name,
double value)
Returns
true if a header with the name and value exists. |
boolean |
containsFloat(K name,
float value)
Returns
true if a header with the name and value exists. |
boolean |
containsInt(K name,
int value)
Returns
true if a header with the name and value exists. |
boolean |
containsLong(K name,
long value)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(K name,
java.lang.Object value)
Returns
true if a header with the name and value exists. |
boolean |
containsShort(K name,
short value)
Returns
true if a header with the name and value exists. |
boolean |
containsTimeMillis(K name,
long value)
Returns
true if a header with the name and value exists. |
DefaultHeaders<K,V,T> |
copy()
Returns a deep copy of this instance.
|
boolean |
equals(Headers<K,V,?> h2,
HashingStrategy<V> valueHashingStrategy)
Test this object for equality against
h2. |
boolean |
equals(java.lang.Object o) |
V |
get(K name)
Returns the value of a header with the specified name.
|
V |
get(K name,
V defaultValue)
Returns the value of a header with the specified name.
|
java.util.List<V> |
getAll(K name)
Returns all values for the header with the specified name.
|
java.util.List<V> |
getAllAndRemove(K name)
Returns all values for the header with the specified name and removes them from this object.
|
V |
getAndRemove(K name)
Returns the value of a header with the specified name and removes it from this object.
|
V |
getAndRemove(K name,
V defaultValue)
Returns the value of a header with the specified name and removes it from this object.
|
java.lang.Boolean |
getBoolean(K name)
Returns the
boolean value of a header with the specified name. |
boolean |
getBoolean(K name,
boolean defaultValue)
Returns the
boolean value of a header with the specified name. |
java.lang.Boolean |
getBooleanAndRemove(K name)
Returns the
boolean value of a header with the specified name and removes the header from this
object. |
boolean |
getBooleanAndRemove(K name,
boolean defaultValue)
Returns the
boolean value of a header with the specified name and removes the header from this
object. |
java.lang.Byte |
getByte(K name)
Returns the
byte value of a header with the specified name. |
byte |
getByte(K name,
byte defaultValue)
Returns the
byte value of a header with the specified name. |
java.lang.Byte |
getByteAndRemove(K name)
Returns the
byte value of a header with the specified name and removes the header from this
object. |
byte |
getByteAndRemove(K name,
byte defaultValue)
Returns the
byte value of a header with the specified name and removes the header from this
object. |
java.lang.Character |
getChar(K name)
Returns the
char value of a header with the specified name. |
char |
getChar(K name,
char defaultValue)
Returns the
char value of a header with the specified name. |
java.lang.Character |
getCharAndRemove(K name)
Returns the
char value of a header with the specified name and removes the header from this
object. |
char |
getCharAndRemove(K name,
char defaultValue)
Returns the
char value of a header with the specified name and removes the header from this
object. |
java.lang.Double |
getDouble(K name)
Returns the
double value of a header with the specified name. |
double |
getDouble(K name,
double defaultValue)
Returns the
double value of a header with the specified name. |
java.lang.Double |
getDoubleAndRemove(K name)
Returns the
double value of a header with the specified name and removes the header from this
object. |
double |
getDoubleAndRemove(K name,
double defaultValue)
Returns the
double value of a header with the specified name and removes the header from this
object. |
java.lang.Float |
getFloat(K name)
Returns the
float value of a header with the specified name. |
float |
getFloat(K name,
float defaultValue)
Returns the
float value of a header with the specified name. |
java.lang.Float |
getFloatAndRemove(K name)
Returns the
float value of a header with the specified name and removes the header from this
object. |
float |
getFloatAndRemove(K name,
float defaultValue)
Returns the
float value of a header with the specified name and removes the header from this
object. |
java.lang.Integer |
getInt(K name)
Returns the
int value of a header with the specified name. |
int |
getInt(K name,
int defaultValue)
Returns the
int value of a header with the specified name. |
java.lang.Integer |
getIntAndRemove(K name)
Returns the
int value of a header with the specified name and removes the header from this
object. |
int |
getIntAndRemove(K name,
int defaultValue)
Returns the
int value of a header with the specified name and removes the header from this
object. |
java.lang.Long |
getLong(K name)
Returns the
long value of a header with the specified name. |
long |
getLong(K name,
long defaultValue)
Returns the
long value of a header with the specified name. |
java.lang.Long |
getLongAndRemove(K name)
Returns the
long value of a header with the specified name and removes the header from this
object. |
long |
getLongAndRemove(K name,
long defaultValue)
Returns the
long value of a header with the specified name and removes the header from this
object. |
java.lang.Short |
getShort(K name)
Returns the
short value of a header with the specified name. |
short |
getShort(K name,
short defaultValue)
Returns the
short value of a header with the specified name. |
java.lang.Short |
getShortAndRemove(K name)
Returns the
short value of a header with the specified name and removes the header from this
object. |
short |
getShortAndRemove(K name,
short defaultValue)
Returns the
short value of a header with the specified name and removes the header from this
object. |
java.lang.Long |
getTimeMillis(K name)
Returns the value of a header with the specified name in milliseconds.
|
long |
getTimeMillis(K name,
long defaultValue)
Returns the value of a header with the specified name in milliseconds.
|
java.lang.Long |
getTimeMillisAndRemove(K name)
Returns the value of a header with the specified
name in milliseconds and removes the header from this
object. |
long |
getTimeMillisAndRemove(K name,
long defaultValue)
Returns the value of a header with the specified
name in milliseconds and removes the header from this
object. |
int |
hashCode() |
int |
hashCode(HashingStrategy<V> valueHashingStrategy)
Generate a hash code for this object given a
HashingStrategy to generate hash codes for
individual values. |
boolean |
isEmpty()
|
java.util.Iterator<java.util.Map.Entry<K,V>> |
iterator() |
java.util.Set<K> |
names()
Returns a
Set of all header names in this object. |
protected DefaultHeaders.NameValidator<K> |
nameValidator() |
protected DefaultHeaders.HeaderEntry<K,V> |
newHeaderEntry(int h,
K name,
V value,
DefaultHeaders.HeaderEntry<K,V> next) |
boolean |
remove(K name)
Removes all headers with the specified
name. |
T |
set(Headers<? extends K,? extends V,?> headers)
Clears the current header entries and copies all header entries of the specified
headers. |
T |
set(K name,
java.lang.Iterable<? extends V> values)
Sets a new header with the specified name and values.
|
T |
set(K name,
V... values)
Sets a header with the specified name and values.
|
T |
set(K name,
V value)
Sets a header with the specified name and value.
|
T |
setAll(Headers<? extends K,? extends V,?> headers)
Retains all current headers but calls
#set(K, V) for each entry in headers. |
T |
setBoolean(K name,
boolean value)
Set the
name to value. |
T |
setByte(K name,
byte value)
Set the
name to value. |
T |
setChar(K name,
char value)
Set the
name to value. |
T |
setDouble(K name,
double value)
Set the
name to value. |
T |
setFloat(K name,
float value)
Set the
name to value. |
T |
setInt(K name,
int value)
Set the
name to value. |
T |
setLong(K name,
long value)
Set the
name to value. |
T |
setObject(K name,
java.lang.Iterable<?> values)
Sets a header with the specified name and values.
|
T |
setObject(K name,
java.lang.Object... values)
Sets a header with the specified name and values.
|
T |
setObject(K name,
java.lang.Object value)
Sets a new header.
|
T |
setShort(K name,
short value)
Set the
name to value. |
T |
setTimeMillis(K name,
long value)
Set the
name to value. |
int |
size()
Returns the number of headers in this object.
|
java.lang.String |
toString() |
protected void |
validateName(DefaultHeaders.NameValidator<K> validator,
boolean forAdd,
K name)
Call out to the given
DefaultHeaders.NameValidator to validate the given name. |
protected void |
validateValue(DefaultHeaders.ValueValidator<V> validator,
K name,
V value) |
protected ValueConverter<V> |
valueConverter() |
java.util.Iterator<V> |
valueIterator(K name)
Equivalent to
getAll(Object) but no intermediate list is generated. |
protected DefaultHeaders.ValueValidator<V> |
valueValidator() |
protected final DefaultHeaders.HeaderEntry<K,V> head
public DefaultHeaders(ValueConverter<V> valueConverter)
public DefaultHeaders(ValueConverter<V> valueConverter, DefaultHeaders.NameValidator<K> nameValidator)
public DefaultHeaders(HashingStrategy<K> nameHashingStrategy, ValueConverter<V> valueConverter)
public DefaultHeaders(HashingStrategy<K> nameHashingStrategy, ValueConverter<V> valueConverter, DefaultHeaders.NameValidator<K> nameValidator)
public DefaultHeaders(HashingStrategy<K> nameHashingStrategy, ValueConverter<V> valueConverter, DefaultHeaders.NameValidator<K> nameValidator, int arraySizeHint)
nameHashingStrategy - Used to hash and equality compare names.valueConverter - Used to convert values to/from native types.nameValidator - Used to validate name elements.arraySizeHint - 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.public DefaultHeaders(HashingStrategy<K> nameHashingStrategy, ValueConverter<V> valueConverter, DefaultHeaders.NameValidator<K> nameValidator, int arraySizeHint, DefaultHeaders.ValueValidator<V> valueValidator)
nameHashingStrategy - Used to hash and equality compare names.valueConverter - Used to convert values to/from native types.nameValidator - Used to validate name elements.arraySizeHint - 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.valueValidator - The validation strategy for entry values.public V get(K name)
Headerspublic V get(K name, V defaultValue)
Headerspublic V getAndRemove(K name)
Headerspublic V getAndRemove(K name, V defaultValue)
Headerspublic java.util.List<V> getAll(K name)
HeadersList can't be modified.public java.util.Iterator<V> valueIterator(K name)
getAll(Object) but no intermediate list is generated.name - the name of the header to retrieveIterator of header values corresponding to name.public java.util.List<V> getAllAndRemove(K name)
HeadersList can't be modified.public boolean contains(K name)
Headerstrue if a header with the name exists, false otherwise.public boolean containsObject(K name, java.lang.Object value)
Headerstrue if a header with the name and value exists.public boolean containsBoolean(K name, boolean value)
Headerstrue if a header with the name and value exists.public boolean containsByte(K name, byte value)
Headerstrue if a header with the name and value exists.public boolean containsChar(K name, char value)
Headerstrue if a header with the name and value exists.public boolean containsShort(K name, short value)
Headerstrue if a header with the name and value exists.public boolean containsInt(K name, int value)
Headerstrue if a header with the name and value exists.public boolean containsLong(K name, long value)
Headerstrue if a header with the name and value exists.public boolean containsFloat(K name, float value)
Headerstrue if a header with the name and value exists.public boolean containsDouble(K name, double value)
Headerstrue if a header with the name and value exists.public boolean containsTimeMillis(K name, long value)
Headerstrue if a header with the name and value exists.public boolean contains(K name, V value)
Headerstrue if a header with the name and value exists, false otherwise.
The Object.equals(Object) method is used to test for equality of value.
public final boolean contains(K name, V value, HashingStrategy<? super V> valueHashingStrategy)
public int size()
Headerspublic boolean isEmpty()
Headerspublic java.util.Set<K> names()
HeadersSet of all header names in this object. The returned Set cannot be modified.public T add(K name, V value)
Headersname and value.public T add(K name, java.lang.Iterable<? extends V> values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
public T add(K name, V... values)
Headersname and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
public T addObject(K name, java.lang.Object value)
Headersvalue is added, it's converted to type T.public T addObject(K name, java.lang.Iterable<?> values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
public T addObject(K name, java.lang.Object... values)
Headers
for (Object v : values) {
headers.addObject(name, v);
}
public T add(Headers<? extends K,? extends V,?> headers)
Headersheaders to this object.public T set(K name, V value)
Headerspublic T set(K name, java.lang.Iterable<? extends V> values)
Headers
for (T v : values) {
headers.addObject(name, v);
}
public T set(K name, V... values)
Headers
headers.remove(name);
for (T v : values) {
headers.add(name, v);
}
public T setObject(K name, java.lang.Object value)
Headersvalue is add, it's
converted to type T.public T setObject(K name, java.lang.Iterable<?> values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
public T setObject(K name, java.lang.Object... values)
Headers
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
public T setInt(K name, int value)
Headersname to value. This will remove all previous values associated with name.public T setLong(K name, long value)
Headersname to value. This will remove all previous values associated with name.public T setDouble(K name, double value)
Headersname to value. This will remove all previous values associated with name.public T setTimeMillis(K name, long value)
Headersname to value. This will remove all previous values associated with name.public T setFloat(K name, float value)
Headersname to value. This will remove all previous values associated with name.public T setChar(K name, char value)
Headersname to value. This will remove all previous values associated with name.public T setBoolean(K name, boolean value)
Headersname to value. This will remove all previous values associated with name.public T setByte(K name, byte value)
Headersname to value. This will remove all previous values associated with name.public T setShort(K name, short value)
Headersname to value. This will remove all previous values associated with name.public T set(Headers<? extends K,? extends V,?> headers)
Headersheaders.public T setAll(Headers<? extends K,? extends V,?> headers)
Headers#set(K, V) for each entry in headers.public T clear()
HeadersHeaders.size() equals 0.public java.lang.Boolean getBoolean(K name)
Headersboolean value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public boolean getBoolean(K name, boolean defaultValue)
Headersboolean value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Byte getByte(K name)
Headersbyte value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public byte getByte(K name, byte defaultValue)
Headersbyte value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Character getChar(K name)
Headerschar value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public char getChar(K name, char defaultValue)
Headerschar value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Short getShort(K name)
Headersshort value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public short getShort(K name, short defaultValue)
Headersshort value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Integer getInt(K name)
Headersint value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public int getInt(K name, int defaultValue)
Headersint value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Long getLong(K name)
Headerslong value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public long getLong(K name, long defaultValue)
Headerslong value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Float getFloat(K name)
Headersfloat value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public float getFloat(K name, float defaultValue)
Headersfloat value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Double getDouble(K name)
Headersdouble value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public double getDouble(K name, double defaultValue)
Headersdouble value of a header with the specified name. If there is more than one value for the
specified name, the first value in insertion order is returned.public java.lang.Long getTimeMillis(K name)
Headerspublic long getTimeMillis(K name, long defaultValue)
Headerspublic java.lang.Boolean getBooleanAndRemove(K name)
Headersboolean value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public boolean getBooleanAndRemove(K name, boolean defaultValue)
Headersboolean value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Byte getByteAndRemove(K name)
Headersbyte value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public byte getByteAndRemove(K name, byte defaultValue)
Headersbyte value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Character getCharAndRemove(K name)
Headerschar value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public char getCharAndRemove(K name, char defaultValue)
Headerschar value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Short getShortAndRemove(K name)
Headersshort value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public short getShortAndRemove(K name, short defaultValue)
Headersshort value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Integer getIntAndRemove(K name)
Headersint value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public int getIntAndRemove(K name, int defaultValue)
Headersint value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Long getLongAndRemove(K name)
Headerslong value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public long getLongAndRemove(K name, long defaultValue)
Headerslong value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Float getFloatAndRemove(K name)
Headersfloat value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public float getFloatAndRemove(K name, float defaultValue)
Headersfloat value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Double getDoubleAndRemove(K name)
Headersdouble value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public double getDoubleAndRemove(K name, double defaultValue)
Headersdouble value of a header with the specified name and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is returned.
In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public java.lang.Long getTimeMillisAndRemove(K name)
Headersname in milliseconds and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is
returned. In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public long getTimeMillisAndRemove(K name, long defaultValue)
Headersname in milliseconds and removes the header from this
object. If there is more than one value for the specified name, the first value in insertion order is
returned. In any case all values for name are removed.
If an exception occurs during the translation from type T all entries with name may still
be removed.
public boolean equals(java.lang.Object o)
equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic final boolean equals(Headers<K,V,?> h2, HashingStrategy<V> valueHashingStrategy)
h2.h2 - The object to check equality for.valueHashingStrategy - Defines how values will be compared for equality.true if this object equals h2 given valueHashingStrategy.
false otherwise.public final int hashCode(HashingStrategy<V> valueHashingStrategy)
HashingStrategy to generate hash codes for
individual values.valueHashingStrategy - Defines how values will be hashed.public java.lang.String toString()
toString 在类中 java.lang.Objectprotected void validateName(DefaultHeaders.NameValidator<K> validator, boolean forAdd, K name)
DefaultHeaders.NameValidator to validate the given name.validator - the validator to useforAdd - true if this validation is for adding to the headers, or false if this is for
setting (overwriting) the given header.name - the name to validate.protected void validateValue(DefaultHeaders.ValueValidator<V> validator, K name, V value)
protected DefaultHeaders.HeaderEntry<K,V> newHeaderEntry(int h, K name, V value, DefaultHeaders.HeaderEntry<K,V> next)
protected ValueConverter<V> valueConverter()
protected DefaultHeaders.NameValidator<K> nameValidator()
protected DefaultHeaders.ValueValidator<V> valueValidator()
public DefaultHeaders<K,V,T> copy()