GeezerVison is showing netty.io — EmptyHeaders (Netty API Reference (4.1.141.Final))
Class EmptyHeaders<K, V, T extends Headers<K,V,T>>
-
Constructor Summary
Constructors
-
Method Summary
Modifier and Type
Method
Description
Adds all header names and values of headers to this object.
Adds new headers with the specified name and values.
Adds a new header with the specified name and value.
Adds new headers with the specified name and values.
Adds a new header with the specified name and values.
Adds a new header with the specified name and values.
boolean
Returns true if a header with the name exists, false otherwise.
boolean
Returns true if a header with the name and value exists, false otherwise.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns true if a header with the name and value exists.
boolean
Returns the value of a header with the specified name.
get(K name,
V defaultValue)
Returns the value of a header with the specified name.
Returns all values for the header with the specified name.
Returns all values for the header with the specified name and removes them from this object.
Returns the value of a header with the specified name and removes it from this object.
Returns the value of a header with the specified name and removes it from this object.
Returns the boolean value of a header with the specified name.
boolean
Returns the boolean value of a header with the specified name.
Returns the boolean value of a header with the specified name and removes the header from this
object.
boolean
Returns the boolean value of a header with the specified name and removes the header from this
object.
Returns the byte value of a header with the specified name.
byte
Returns the byte value of a header with the specified name.
Returns the byte value of a header with the specified name and removes the header from this
object.
byte
Returns the byte value of a header with the specified name and removes the header from this
object.
Returns the char value of a header with the specified name.
char
Returns the char value of a header with the specified name.
Returns the char value of a header with the specified name and removes the header from this
object.
char
Returns the char value of a header with the specified name and removes the header from this
object.
Returns the double value of a header with the specified name.
double
Returns the double value of a header with the specified name.
Returns the double value of a header with the specified name and removes the header from this
object.
double
Returns the double value of a header with the specified name and removes the header from this
object.
Returns the float value of a header with the specified name.
float
Returns the float value of a header with the specified name.
Returns the float value of a header with the specified name and removes the header from this
object.
float
Returns the float value of a header with the specified name and removes the header from this
object.
Returns the int value of a header with the specified name.
int
Returns the int value of a header with the specified name.
Returns the int value of a header with the specified name and removes the header from this
object.
int
Returns the int value of a header with the specified name and removes the header from this
object.
Returns the long value of a header with the specified name.
long
Returns the long value of a header with the specified name.
Returns the long value of a header with the specified name and removes the header from this
object.
long
Returns the long value of a header with the specified name and removes the header from this
object.
Returns the short value of a header with the specified name.
short
Returns the short value of a header with the specified name.
Returns the short value of a header with the specified name and removes the header from this
object.
short
Returns the short value of a header with the specified name and removes the header from this
object.
Returns the value of a header with the specified name in milliseconds.
long
Returns the value of a header with the specified name in milliseconds.
Returns the value of a header with the specified name in milliseconds and removes the header from this
object.
long
Returns the value of a header with the specified name in milliseconds and removes the header from this
object.
int
boolean
Returns a Set of all header names in this object.
boolean
Removes all headers with the specified name.
Clears the current header entries and copies all header entries of the specified headers.
Sets a new header with the specified name and values.
Sets a header with the specified name and value.
Sets a header with the specified name and values.
Sets a header with the specified name and values.
Sets a header with the specified name and values.
int
Returns the number of headers in this object.
-
-
Method Details
-
get
Description copied from interface: Headers
Returns the 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.
- Specified by:
get in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the first header value if the header is found.
null if there's no such header
-
get
public V get(K name,
V defaultValue)
Description copied from interface: Headers
Returns the 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.
- Specified by:
get in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the first header value or
defaultValue if there is no such header
-
getAndRemove
public V getAndRemove(K name)
Description copied from interface: Headers
Returns the value of a header with the specified name and removes it from this object. If there is more than
one value for the specified name, the first value in insertion order is returned.
- Specified by:
getAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the first header value or
null if there is no such header
-
getAndRemove
public V getAndRemove(K name,
V defaultValue)
Description copied from interface: Headers
Returns the value of a header with the specified name and removes it from this object. If there is more than
one value for the specified name, the first value in insertion order is returned.
- Specified by:
getAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the first header value or
defaultValue if there is no such header
-
getAll
Description copied from interface: Headers
Returns all values for the header with the specified name. The returned List can't be modified.
- Specified by:
getAll in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- a
List of header values or an empty List if no values are found.
-
getAllAndRemove
public List<V> getAllAndRemove(K name)
Description copied from interface: Headers
Returns all values for the header with the specified name and removes them from this object.
The returned List can't be modified.
- Specified by:
getAllAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- a
List of header values or an empty List if no values are found.
-
getBoolean
Description copied from interface: Headers
Returns the boolean 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.
- Specified by:
getBoolean in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
boolean value of the first value in insertion order or null if there is no such
value or it can't be converted to boolean.
-
getBoolean
public boolean getBoolean(K name,
boolean defaultValue)
Description copied from interface: Headers
Returns the boolean 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.
- Specified by:
getBoolean in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
boolean value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to boolean.
-
getByte
public Byte getByte(K name)
Description copied from interface: Headers
Returns the byte 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.
- Specified by:
getByte in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
byte value of the first value in insertion order or null if there is no such
value or it can't be converted to byte.
-
getByte
public byte getByte(K name,
byte defaultValue)
Description copied from interface: Headers
Returns the byte 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.
- Specified by:
getByte in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
byte value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to byte.
-
getChar
Description copied from interface: Headers
Returns the char 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.
- Specified by:
getChar in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
char value of the first value in insertion order or null if there is no such
value or it can't be converted to char.
-
getChar
public char getChar(K name,
char defaultValue)
Description copied from interface: Headers
Returns the char 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.
- Specified by:
getChar in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
char value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to char.
-
getShort
Description copied from interface: Headers
Returns the short 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.
- Specified by:
getShort in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
short value of the first value in insertion order or null if there is no such
value or it can't be converted to short.
-
getShort
public short getShort(K name,
short defaultValue)
Description copied from interface: Headers
Returns the short 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.
- Specified by:
getShort in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
short value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to short.
-
getInt
Description copied from interface: Headers
Returns the int 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.
- Specified by:
getInt in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
int value of the first value in insertion order or null if there is no such
value or it can't be converted to int.
-
getInt
public int getInt(K name,
int defaultValue)
Description copied from interface: Headers
Returns the int 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.
- Specified by:
getInt in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
int value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to int.
-
getLong
public Long getLong(K name)
Description copied from interface: Headers
Returns the long 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.
- Specified by:
getLong in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
long value of the first value in insertion order or null if there is no such
value or it can't be converted to long.
-
getLong
public long getLong(K name,
long defaultValue)
Description copied from interface: Headers
Returns the long 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.
- Specified by:
getLong in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
long value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to long.
-
getFloat
Description copied from interface: Headers
Returns the float 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.
- Specified by:
getFloat in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
float value of the first value in insertion order or null if there is no such
value or it can't be converted to float.
-
getFloat
public float getFloat(K name,
float defaultValue)
Description copied from interface: Headers
Returns the float 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.
- Specified by:
getFloat in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
float value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to float.
-
getDouble
Description copied from interface: Headers
Returns the double 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.
- Specified by:
getDouble in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
double value of the first value in insertion order or null if there is no such
value or it can't be converted to double.
-
getDouble
public double getDouble(K name,
double defaultValue)
Description copied from interface: Headers
Returns the double 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.
- Specified by:
getDouble in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the
double value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to double.
-
getTimeMillis
public Long getTimeMillis(K name)
Description copied from interface: Headers
Returns the value of a header with the specified name in milliseconds. If there is more than one value for the
specified name, the first value in insertion order is returned.
- Specified by:
getTimeMillis in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the milliseconds value of the first value in insertion order or
null if there is no such
value or it can't be converted to milliseconds.
-
getTimeMillis
public long getTimeMillis(K name,
long defaultValue)
Description copied from interface: Headers
Returns the value of a header with the specified name in milliseconds. If there is more than one value for the
specified name, the first value in insertion order is returned.
- Specified by:
getTimeMillis in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the milliseconds value of the first value in insertion order or
defaultValue if there is no such
value or it can't be converted to milliseconds.
-
getBooleanAndRemove
public Boolean getBooleanAndRemove(K name)
Description copied from interface: Headers
Returns the boolean 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.
- Specified by:
getBooleanAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the
boolean value of the first value in insertion order or null if there is no
such value or it can't be converted to boolean.
-
getBooleanAndRemove
public boolean getBooleanAndRemove(K name,
boolean defaultValue)
Description copied from interface: Headers
Returns the boolean 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.
- Specified by:
getBooleanAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
boolean value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to boolean.
-
getByteAndRemove
public Byte getByteAndRemove(K name)
Description copied from interface: Headers
Returns the byte 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.
- Specified by:
getByteAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
byte value of the first value in insertion order or null if there is no
such value or it can't be converted to byte.
-
getByteAndRemove
public byte getByteAndRemove(K name,
byte defaultValue)
Description copied from interface: Headers
Returns the byte 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.
- Specified by:
getByteAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
byte value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to byte.
-
getCharAndRemove
Description copied from interface: Headers
Returns the char 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.
- Specified by:
getCharAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
char value of the first value in insertion order or null if there is no
such value or it can't be converted to char.
-
getCharAndRemove
public char getCharAndRemove(K name,
char defaultValue)
Description copied from interface: Headers
Returns the char 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.
- Specified by:
getCharAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
char value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to char.
-
getShortAndRemove
public Short getShortAndRemove(K name)
Description copied from interface: Headers
Returns the short 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.
- Specified by:
getShortAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
short value of the first value in insertion order or null if there is no
such value or it can't be converted to short.
-
getShortAndRemove
public short getShortAndRemove(K name,
short defaultValue)
Description copied from interface: Headers
Returns the short 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.
- Specified by:
getShortAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
short value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to short.
-
getIntAndRemove
Description copied from interface: Headers
Returns the int 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.
- Specified by:
getIntAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
int value of the first value in insertion order or null if there is no
such value or it can't be converted to int.
-
getIntAndRemove
public int getIntAndRemove(K name,
int defaultValue)
Description copied from interface: Headers
Returns the int 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.
- Specified by:
getIntAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
int value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to int.
-
getLongAndRemove
public Long getLongAndRemove(K name)
Description copied from interface: Headers
Returns the long 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.
- Specified by:
getLongAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
long value of the first value in insertion order or null if there is no
such value or it can't be converted to long.
-
getLongAndRemove
public long getLongAndRemove(K name,
long defaultValue)
Description copied from interface: Headers
Returns the long 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.
- Specified by:
getLongAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
long value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to long.
-
getFloatAndRemove
public Float getFloatAndRemove(K name)
Description copied from interface: Headers
Returns the float 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.
- Specified by:
getFloatAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
float value of the first value in insertion order or null if there is no
such value or it can't be converted to float.
-
getFloatAndRemove
public float getFloatAndRemove(K name,
float defaultValue)
Description copied from interface: Headers
Returns the float 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.
- Specified by:
getFloatAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
float value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to float.
-
getDoubleAndRemove
public Double getDoubleAndRemove(K name)
Description copied from interface: Headers
Returns the double 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.
- Specified by:
getDoubleAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
- Returns:
- the
double value of the first value in insertion order or null if there is no
such value or it can't be converted to double.
-
getDoubleAndRemove
public double getDoubleAndRemove(K name,
double defaultValue)
Description copied from interface: Headers
Returns the double 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.
- Specified by:
getDoubleAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to search
defaultValue - the default value
- Returns:
- the
double value of the first value in insertion order or defaultValue if there is no
such value or it can't be converted to double.
-
getTimeMillisAndRemove
public Long getTimeMillisAndRemove(K name)
Description copied from interface: Headers
Returns the value of a header with the specified name 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.
- Specified by:
getTimeMillisAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
- Returns:
- the milliseconds value of the first value in insertion order or
null if there is no such
value or it can't be converted to milliseconds.
-
getTimeMillisAndRemove
public long getTimeMillisAndRemove(K name,
long defaultValue)
Description copied from interface: Headers
Returns the value of a header with the specified name 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.
- Specified by:
getTimeMillisAndRemove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header to retrieve
defaultValue - the default value
- Returns:
- the milliseconds value of the first value in insertion order or
defaultValue if there is no such
value or it can't be converted to milliseconds.
-
contains
public boolean contains(K name)
Description copied from interface: Headers
Returns true if a header with the name exists, false otherwise.
- Specified by:
contains in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
-
contains
public boolean contains(K name,
V value)
Description copied from interface: Headers
Returns true if a header with the name and value exists, false otherwise.
The Object.equals(Object) method is used to test for equality of value.
- Specified by:
contains in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value of the header to find
-
containsObject
public boolean containsObject(K name,
Object value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsBoolean
public boolean containsBoolean(K name,
boolean value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsBoolean in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsByte
public boolean containsByte(K name,
byte value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsByte in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsChar
public boolean containsChar(K name,
char value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsChar in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsShort
public boolean containsShort(K name,
short value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsShort in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsInt
public boolean containsInt(K name,
int value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsInt in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsLong
public boolean containsLong(K name,
long value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsLong in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsFloat
public boolean containsFloat(K name,
float value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsFloat in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsDouble
public boolean containsDouble(K name,
double value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsDouble in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
containsTimeMillis
public boolean containsTimeMillis(K name,
long value)
Description copied from interface: Headers
Returns true if a header with the name and value exists.
- Specified by:
containsTimeMillis in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the header value
- Returns:
true if it contains it false otherwise
-
size
public int size()
Description copied from interface: Headers
Returns the number of headers in this object.
- Specified by:
size in interface Headers<K, V, T extends Headers<K,V,T>>
-
-
names
Description copied from interface: Headers
Returns a Set of all header names in this object. The returned Set cannot be modified.
- Specified by:
names in interface Headers<K, V, T extends Headers<K,V,T>>
-
add
public T add(K name,
V value)
Description copied from interface: Headers
Adds a new header with the specified name and value.
- Specified by:
add in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the name of the header
value - the value of the header
- Returns:
this
-
add
Description copied from interface: Headers
Adds new headers with the specified name and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
- Specified by:
add in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the values of the header
- Returns:
this
-
add
public T add(K name,
V... values)
Description copied from interface: Headers
Adds new headers with the specified name and values. This method is semantically equivalent to
for (T value : values) {
headers.add(name, value);
}
- Specified by:
add in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the values of the header
- Returns:
this
-
addObject
public T addObject(K name,
Object value)
Description copied from interface: Headers
Adds a new header. Before the value is added, it's converted to type T.
- Specified by:
addObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addObject
Description copied from interface: Headers
Adds a new header with the specified name and values. This method is equivalent to
for (Object v : values) {
headers.addObject(name, v);
}
- Specified by:
addObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the value of the header
- Returns:
this
-
addObject
public T addObject(K name,
Object... values)
Description copied from interface: Headers
Adds a new header with the specified name and values. This method is equivalent to
for (Object v : values) {
headers.addObject(name, v);
}
- Specified by:
addObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the value of the header
- Returns:
this
-
addBoolean
public T addBoolean(K name,
boolean value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addBoolean in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addByte
public T addByte(K name,
byte value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addByte in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addChar
public T addChar(K name,
char value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addChar in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addShort
public T addShort(K name,
short value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addShort in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addInt
public T addInt(K name,
int value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addInt in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addLong
public T addLong(K name,
long value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addLong in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addFloat
public T addFloat(K name,
float value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addFloat in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addDouble
public T addDouble(K name,
double value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addDouble in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
addTimeMillis
public T addTimeMillis(K name,
long value)
Description copied from interface: Headers
Adds a new header.
- Specified by:
addTimeMillis in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
add
public T add(Headers<? extends K, ? extends V, ?> headers)
Description copied from interface: Headers
Adds all header names and values of headers to this object.
- Specified by:
add in interface Headers<K, V, T extends Headers<K,V,T>>
- Returns:
this
-
set
public T set(K name,
V value)
Description copied from interface: Headers
Sets a header with the specified name and value. Any existing headers with the same name are overwritten.
- Specified by:
set in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
set
Description copied from interface: Headers
Sets a new header with the specified name and values. This method is equivalent to
for (T v : values) {
headers.addObject(name, v);
}
- Specified by:
set in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the value of the header
- Returns:
this
-
set
public T set(K name,
V... values)
Description copied from interface: Headers
Sets a header with the specified name and values. Any existing headers with this name are removed. This method
is equivalent to:
headers.remove(name);
for (T v : values) {
headers.add(name, v);
}
- Specified by:
set in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the value of the header
- Returns:
this
-
setObject
public T setObject(K name,
Object value)
Description copied from interface: Headers
Sets a new header. Any existing headers with this name are removed. Before the value is add, it's
converted to type T.
- Specified by:
setObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
value - the value of the header
- Returns:
this
-
setObject
Description copied from interface: Headers
Sets a header with the specified name and values. Any existing headers with this name are removed. This method
is equivalent to:
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
- Specified by:
setObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the values of the header
- Returns:
this
-
setObject
public T setObject(K name,
Object... values)
Description copied from interface: Headers
Sets a header with the specified name and values. Any existing headers with this name are removed. This method
is equivalent to:
headers.remove(name);
for (Object v : values) {
headers.addObject(name, v);
}
- Specified by:
setObject in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
values - the values of the header
- Returns:
this
-
setBoolean
public T setBoolean(K name,
boolean value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setBoolean in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setByte
public T setByte(K name,
byte value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setByte in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setChar
public T setChar(K name,
char value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setChar in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setShort
public T setShort(K name,
short value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setShort in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setInt
public T setInt(K name,
int value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setInt in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setLong
public T setLong(K name,
long value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setLong in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setFloat
public T setFloat(K name,
float value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setFloat in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setDouble
public T setDouble(K name,
double value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setDouble in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
setTimeMillis
public T setTimeMillis(K name,
long value)
Description copied from interface: Headers
Set the name to value. This will remove all previous values associated with name.
- Specified by:
setTimeMillis in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - The name to modify
value - The value
- Returns:
this
-
set
public T set(Headers<? extends K, ? extends V, ?> headers)
Description copied from interface: Headers
Clears the current header entries and copies all header entries of the specified headers.
- Specified by:
set in interface Headers<K, V, T extends Headers<K,V,T>>
- Returns:
this
-
-
remove
public boolean remove(K name)
Description copied from interface: Headers
Removes all headers with the specified name.
- Specified by:
remove in interface Headers<K, V, T extends Headers<K,V,T>>
- Parameters:
name - the header name
- Returns:
true if at least one entry has been removed.
-
-
valueIterator
- Parameters:
name - the name of the header to retrieve
- Returns:
- an
Iterator of header values corresponding to name.
-
-
-
-
|