public class DefaultHeaders<T> extends Object implements Headers<T>
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultHeaders.HashCodeGenerator<T>
Allows users of this interface to specify a hash code other than the default
Object.hashCode() |
static class |
DefaultHeaders.IdentityNameConverter<T>
A name converted which does not covert but instead just returns this
name unchanged |
protected class |
DefaultHeaders.KeyValueHeaderIterator |
static interface |
DefaultHeaders.NameConverter<T>
Allows users to convert the
name elements before being processed by this map |
Headers.EntryVisitor<T>, Headers.NameVisitor<T>, Headers.ValueConverter<T>
Constructor and Description |
---|
DefaultHeaders(Comparator<? super T> keyComparator,
Comparator<? super T> valueComparator,
DefaultHeaders.HashCodeGenerator<T> hashCodeGenerator,
Headers.ValueConverter<T> typeConverter) |
DefaultHeaders(Comparator<? super T> keyComparator,
Comparator<? super T> valueComparator,
DefaultHeaders.HashCodeGenerator<T> hashCodeGenerator,
Headers.ValueConverter<T> typeConverter,
DefaultHeaders.NameConverter<T> nameConverter) |
DefaultHeaders(Comparator<? super T> keyComparator,
Comparator<? super T> valueComparator,
DefaultHeaders.HashCodeGenerator<T> hashCodeGenerator,
Headers.ValueConverter<T> valueConverter,
DefaultHeaders.NameConverter<T> nameConverter,
int bucketSize,
int initialMapSize) |
Modifier and Type | Method and Description |
---|---|
Headers<T> |
add(Headers<T> headers)
Adds all header entries of the specified
headers . |
Headers<T> |
add(T name,
Iterable<? extends T> values)
Adds a new header with the specified name and values.
|
Headers<T> |
add(T name,
T... values)
Adds a new header with the specified name and values.
|
Headers<T> |
add(T name,
T value)
Adds a new header with the specified name and value.
|
Headers<T> |
addBoolean(T name,
boolean value)
Add the
name to value . |
Headers<T> |
addByte(T name,
byte value)
Add the
name to value . |
Headers<T> |
addChar(T name,
char value)
Add the
name to value . |
Headers<T> |
addDouble(T name,
double value)
Add the
name to value . |
Headers<T> |
addFloat(T name,
float value)
Add the
name to value . |
Headers<T> |
addInt(T name,
int value)
Add the
name to value . |
Headers<T> |
addLong(T name,
long value)
Add the
name to value . |
Headers<T> |
addObject(T name,
Iterable<?> values)
Adds a new header with the specified name and values.
|
Headers<T> |
addObject(T name,
Object... values)
Adds a new header with the specified name and values.
|
Headers<T> |
addObject(T name,
Object value)
Adds a new header with the specified name and value.
|
Headers<T> |
addShort(T name,
short value)
Add the
name to value . |
Headers<T> |
addTimeMillis(T name,
long value)
Add the
name to value . |
Headers<T> |
clear()
Removes all headers.
|
boolean |
contains(T name)
Returns
true if and only if this collection contains the header with the specified name. |
boolean |
contains(T name,
T value)
Returns
true if a header with the name and value exists. |
boolean |
contains(T name,
T value,
Comparator<? super T> comparator)
Returns
true if a header with the name and value exists. |
boolean |
contains(T name,
T value,
Comparator<? super T> keyComparator,
Comparator<? super T> valueComparator)
Returns
true if a header with the name and value exists. |
boolean |
containsBoolean(T name,
boolean value)
Returns
true if a header with the name and value exists. |
boolean |
containsByte(T name,
byte value)
Returns
true if a header with the name and value exists. |
boolean |
containsChar(T name,
char value)
Returns
true if a header with the name and value exists. |
boolean |
containsDouble(T name,
double value)
Returns
true if a header with the name and value exists. |
boolean |
containsFloat(T name,
float value)
Returns
true if a header with the name and value exists. |
boolean |
containsInt(T name,
int value)
Returns
true if a header with the name and value exists. |
boolean |
containsLong(T name,
long value)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(T name,
Object value)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(T name,
Object value,
Comparator<? super T> comparator)
Returns
true if a header with the name and value exists. |
boolean |
containsObject(T name,
Object value,
Comparator<? super T> keyComparator,
Comparator<? super T> valueComparator)
Returns
true if a header with the name and value exists. |
boolean |
containsShort(T name,
short value)
Returns
true if a header with the name and value exists. |
boolean |
containsTimeMillis(T name,
long value)
Returns
true if a header with the name and value exists. |
List<Map.Entry<T,T>> |
entries()
Returns a new
List that contains all headers in this object. |
boolean |
equals(Object o) |
Map.Entry<T,T> |
forEachEntry(Headers.EntryVisitor<T> visitor)
Provide a means of iterating over elements in this map with low GC
|
T |
forEachName(Headers.NameVisitor<T> visitor)
Provide a means of iterating over elements in this map with low GC
|
T |
get(T name)
Returns the value of a header with the specified name.
|
T |
get(T name,
T defaultValue)
Returns the value of a header with the specified name.
|
List<T> |
getAll(T name)
Returns the values of headers with the specified name
|
List<T> |
getAllAndRemove(T name)
Returns and Removes the values of headers with the specified name
|
T |
getAndRemove(T name)
Returns and removes the value of a header with the specified name.
|
T |
getAndRemove(T name,
T defaultValue)
Returns and removes the value of a header with the specified name.
|
Boolean |
getBoolean(T name)
Returns the boolean value of a header with the specified name.
|
boolean |
getBoolean(T name,
boolean defaultValue)
Returns the boolean value of a header with the specified name.
|
Boolean |
getBooleanAndRemove(T name)
Returns and removes the boolean value of a header with the specified name.
|
boolean |
getBooleanAndRemove(T name,
boolean defaultValue)
Returns and removes the boolean value of a header with the specified name.
|
Byte |
getByte(T name)
Returns the byte value of a header with the specified name.
|
byte |
getByte(T name,
byte defaultValue)
Returns the byte value of a header with the specified name.
|
Byte |
getByteAndRemove(T name)
Returns and removes the byte value of a header with the specified name.
|
byte |
getByteAndRemove(T name,
byte defaultValue)
Returns and removes the byte value of a header with the specified name.
|
Character |
getChar(T name)
Returns the char value of a header with the specified name.
|
char |
getChar(T name,
char defaultValue)
Returns the char value of a header with the specified name.
|
Character |
getCharAndRemove(T name)
Returns and removes the char value of a header with the specified name.
|
char |
getCharAndRemove(T name,
char defaultValue)
Returns and removes the char value of a header with the specified name.
|
Double |
getDouble(T name)
Returns the double value of a header with the specified name.
|
double |
getDouble(T name,
double defaultValue)
Returns the double value of a header with the specified name.
|
Double |
getDoubleAndRemove(T name)
Returns and removes the double value of a header with the specified name.
|
double |
getDoubleAndRemove(T name,
double defaultValue)
Returns and removes the double value of a header with the specified name.
|
Float |
getFloat(T name)
Returns the float value of a header with the specified name.
|
float |
getFloat(T name,
float defaultValue)
Returns the float value of a header with the specified name.
|
Float |
getFloatAndRemove(T name)
Returns and removes the float value of a header with the specified name.
|
float |
getFloatAndRemove(T name,
float defaultValue)
Returns and removes the float value of a header with the specified name.
|
Integer |
getInt(T name)
Returns the integer value of a header with the specified name.
|
int |
getInt(T name,
int defaultValue)
Returns the integer value of a header with the specified name.
|
short |
getInt(T name,
short defaultValue)
Returns the short value of a header with the specified name.
|
Integer |
getIntAndRemove(T name)
Returns and removes the integer value of a header with the specified name.
|
int |
getIntAndRemove(T name,
int defaultValue)
Returns and removes the integer value of a header with the specified name.
|
Long |
getLong(T name)
Returns the long value of a header with the specified name.
|
long |
getLong(T name,
long defaultValue)
Returns the long value of a header with the specified name.
|
Long |
getLongAndRemove(T name)
Returns and removes the long value of a header with the specified name.
|
long |
getLongAndRemove(T name,
long defaultValue)
Returns and removes the long value of a header with the specified name.
|
Short |
getShort(T name)
Returns the short value of a header with the specified name.
|
Short |
getShortAndRemove(T name)
Returns and removes the short value of a header with the specified name.
|
short |
getShortAndRemove(T name,
short defaultValue)
Returns and removes the short value of a header with the specified name.
|
Long |
getTimeMillis(T name)
Returns the date value of a header with the specified name as milliseconds.
|
long |
getTimeMillis(T name,
long defaultValue)
Returns the date value of a header with the specified name as milliseconds.
|
Long |
getTimeMillisAndRemove(T name)
Returns and removes the date value of a header with the specified name as milliseconds.
|
long |
getTimeMillisAndRemove(T name,
long defaultValue)
Returns and removes the date value of a header with the specified name as milliseconds.
|
int |
hashCode() |
boolean |
isEmpty()
Returns
true if and only if this collection contains no header entries. |
Iterator<Map.Entry<T,T>> |
iterator() |
Set<T> |
names()
Returns a new
Set that contains the names of all headers in this object. |
List<T> |
namesList()
Returns a new
List that contains the names of all headers in this object. |
boolean |
remove(T name)
Removes the header with the specified name.
|
Headers<T> |
set(Headers<T> headers)
Cleans the current header entries and copies all header entries of the specified
headers . |
Headers<T> |
set(T name,
Iterable<? extends T> values)
Sets a header with the specified name and values.
|
Headers<T> |
set(T name,
T... values)
Sets a header with the specified name and values.
|
Headers<T> |
set(T name,
T value)
Sets a header with the specified name and value.
|
Headers<T> |
setAll(Headers<T> headers)
Retains all current headers but calls
Headers.set(Object, Object) for each entry in headers |
Headers<T> |
setBoolean(T name,
boolean value)
Set the
name to value . |
Headers<T> |
setByte(T name,
byte value)
Set the
name to value . |
Headers<T> |
setChar(T name,
char value)
Set the
name to value . |
Headers<T> |
setDouble(T name,
double value)
Set the
name to value . |
Headers<T> |
setFloat(T name,
float value)
Set the
name to value . |
Headers<T> |
setInt(T name,
int value)
Set the
name to value . |
Headers<T> |
setLong(T name,
long value)
Set the
name to value . |
Headers<T> |
setObject(T name,
Iterable<?> values)
Sets a header with the specified name and values.
|
Headers<T> |
setObject(T name,
Object... values)
Sets a header with the specified name and values.
|
Headers<T> |
setObject(T name,
Object value)
Sets a header with the specified name and value.
|
Headers<T> |
setShort(T name,
short value)
Set the
name to value . |
Headers<T> |
setTimeMillis(T name,
long value)
Set the
name to value . |
int |
size()
Returns the number of header entries in this collection.
|
String |
toString() |
protected Headers.ValueConverter<T> |
valueConverter() |
public DefaultHeaders(Comparator<? super T> keyComparator, Comparator<? super T> valueComparator, DefaultHeaders.HashCodeGenerator<T> hashCodeGenerator, Headers.ValueConverter<T> typeConverter)
public DefaultHeaders(Comparator<? super T> keyComparator, Comparator<? super T> valueComparator, DefaultHeaders.HashCodeGenerator<T> hashCodeGenerator, Headers.ValueConverter<T> typeConverter, DefaultHeaders.NameConverter<T> nameConverter)
public DefaultHeaders(Comparator<? super T> keyComparator, Comparator<? super T> valueComparator, DefaultHeaders.HashCodeGenerator<T> hashCodeGenerator, Headers.ValueConverter<T> valueConverter, DefaultHeaders.NameConverter<T> nameConverter, int bucketSize, int initialMapSize)
public T get(T name)
Headers
public T get(T name, T defaultValue)
Headers
public T getAndRemove(T name)
Headers
getAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there is no such headerpublic T getAndRemove(T name, T defaultValue)
Headers
getAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there is no such headerpublic List<T> getAll(T name)
Headers
public List<T> getAllAndRemove(T name)
Headers
getAllAndRemove
in interface Headers<T>
name
- The name of the headers to searchList
of header values which will be empty if no values are foundpublic List<Map.Entry<T,T>> entries()
Headers
List
that contains all headers in this object. Note that modifying the returned
List
will not affect the state of this object. If you intend to enumerate over the header entries only,
use Headers.iterator()
instead, which has much less overhead.public boolean contains(T name)
Headers
true
if and only if this collection contains the header with the specified name.public boolean contains(T name, T value)
Headers
true
if a header with the name and value exists.public boolean containsObject(T name, Object value)
Headers
true
if a header with the name and value exists.containsObject
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsBoolean(T name, boolean value)
Headers
true
if a header with the name and value exists.containsBoolean
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsByte(T name, byte value)
Headers
true
if a header with the name and value exists.containsByte
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsChar(T name, char value)
Headers
true
if a header with the name and value exists.containsChar
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsShort(T name, short value)
Headers
true
if a header with the name and value exists.containsShort
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsInt(T name, int value)
Headers
true
if a header with the name and value exists.containsInt
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsLong(T name, long value)
Headers
true
if a header with the name and value exists.containsLong
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsFloat(T name, float value)
Headers
true
if a header with the name and value exists.containsFloat
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsDouble(T name, double value)
Headers
true
if a header with the name and value exists.containsDouble
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean containsTimeMillis(T name, long value)
Headers
true
if a header with the name and value exists.containsTimeMillis
in interface Headers<T>
name
- the header namevalue
- the header valuetrue
if it contains it false
otherwisepublic boolean contains(T name, T value, Comparator<? super T> comparator)
Headers
true
if a header with the name and value exists.public boolean contains(T name, T value, Comparator<? super T> keyComparator, Comparator<? super T> valueComparator)
Headers
true
if a header with the name and value exists.contains
in interface Headers<T>
name
- the header namevalue
- the header valuekeyComparator
- The comparator to use when comparing name
to names in this mapvalueComparator
- The comparator to use when comparing value
to values in this maptrue
if it contains it false
otherwisepublic boolean containsObject(T name, Object value, Comparator<? super T> comparator)
Headers
true
if a header with the name and value exists.containsObject
in interface Headers<T>
name
- the header namevalue
- the header valuecomparator
- The comparator to use when comparing name
and value
to entries in this maptrue
if it contains it false
otherwisepublic boolean containsObject(T name, Object value, Comparator<? super T> keyComparator, Comparator<? super T> valueComparator)
Headers
true
if a header with the name and value exists.containsObject
in interface Headers<T>
name
- the header namevalue
- the header valuekeyComparator
- The comparator to use when comparing name
to names in this mapvalueComparator
- The comparator to use when comparing value
to values in this maptrue
if it contains it false
otherwisepublic int size()
Headers
public boolean isEmpty()
Headers
true
if and only if this collection contains no header entries.public Set<T> names()
Headers
Set
that contains the names of all headers in this object. Note that modifying the returned
Set
will not affect the state of this object. If you intend to enumerate over the header entries only,
use Headers.iterator()
instead, which has much less overhead.public List<T> namesList()
Headers
List
that contains the names of all headers in this object. Note that modifying the
returned List
will not affect the state of this object. If you intend to enumerate over the header
entries only, use Headers.iterator()
instead, which has much less overhead.public Headers<T> add(T name, Iterable<? extends T> values)
Headers
for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> add(T name, T... values)
Headers
for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> addObject(T name, Object value)
Headers
public Headers<T> addObject(T name, Iterable<?> values)
Headers
for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> addObject(T name, Object... values)
Headers
for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> addInt(T name, int value)
Headers
name
to value
.public Headers<T> addLong(T name, long value)
Headers
name
to value
.public Headers<T> addDouble(T name, double value)
Headers
name
to value
.public Headers<T> addTimeMillis(T name, long value)
Headers
name
to value
.addTimeMillis
in interface Headers<T>
name
- The name to modifyvalue
- The valuethis
public Headers<T> addChar(T name, char value)
Headers
name
to value
.public Headers<T> addBoolean(T name, boolean value)
Headers
name
to value
.addBoolean
in interface Headers<T>
name
- The name to modifyvalue
- The valuethis
public Headers<T> addFloat(T name, float value)
Headers
name
to value
.public Headers<T> addByte(T name, byte value)
Headers
name
to value
.public Headers<T> addShort(T name, short value)
Headers
name
to value
.public Headers<T> add(Headers<T> headers)
Headers
headers
.public Headers<T> set(T name, Iterable<? extends T> values)
Headers
headers.remove(name); for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> set(T name, T... values)
Headers
headers.remove(name); for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> setObject(T name, Object value)
Headers
public Headers<T> setObject(T name, Iterable<?> values)
Headers
headers.remove(name); for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> setObject(T name, Object... values)
Headers
headers.remove(name); for (Object v : values) { if (v == null) { break; } headers.add(name, v); }
public Headers<T> setInt(T name, int value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> setLong(T name, long value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> setDouble(T name, double value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> setTimeMillis(T name, long value)
Headers
name
to value
. This will remove all previous values associated with name
.setTimeMillis
in interface Headers<T>
name
- The name to modifyvalue
- The valuethis
public Headers<T> setFloat(T name, float value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> setChar(T name, char value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> setBoolean(T name, boolean value)
Headers
name
to value
. This will remove all previous values associated with name
.setBoolean
in interface Headers<T>
name
- The name to modifyvalue
- The valuethis
public Headers<T> setByte(T name, byte value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> setShort(T name, short value)
Headers
name
to value
. This will remove all previous values associated with name
.public Headers<T> set(Headers<T> headers)
Headers
headers
.public Headers<T> setAll(Headers<T> headers)
Headers
Headers.set(Object, Object)
for each entry in headers
setAll
in interface Headers<T>
headers
- The headers used to Headers.set(Object, Object)
values in this instancethis
public boolean remove(T name)
Headers
public Map.Entry<T,T> forEachEntry(Headers.EntryVisitor<T> visitor) throws Exception
Headers
forEachEntry
in interface Headers<T>
visitor
- The visitor which will visit each element in this mapnull
if iteration went past the endException
public T forEachName(Headers.NameVisitor<T> visitor) throws Exception
Headers
forEachName
in interface Headers<T>
visitor
- The visitor which will visit each element in this mapnull
if iteration went past the endException
public Boolean getBoolean(T name)
Headers
getBoolean
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a boolean.public boolean getBoolean(T name, boolean defaultValue)
Headers
getBoolean
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there's
no such header or its value is not a boolean.public Byte getByte(T name)
Headers
public byte getByte(T name, byte defaultValue)
Headers
public Character getChar(T name)
Headers
public char getChar(T name, char defaultValue)
Headers
public Short getShort(T name)
Headers
public short getInt(T name, short defaultValue)
Headers
public Integer getInt(T name)
Headers
public int getInt(T name, int defaultValue)
Headers
public Long getLong(T name)
Headers
public long getLong(T name, long defaultValue)
Headers
public Float getFloat(T name)
Headers
public float getFloat(T name, float defaultValue)
Headers
public Double getDouble(T name)
Headers
public double getDouble(T name, double defaultValue)
Headers
public Long getTimeMillis(T name)
Headers
getTimeMillis
in interface Headers<T>
name
- The name of the header to searchnull
if
there's no such header or its value is not a date.public long getTimeMillis(T name, long defaultValue)
Headers
getTimeMillis
in interface Headers<T>
name
- The name of the header to searchdefaultValue
- default valuedefaultValue
if there's no such header or its value is not a date.public Boolean getBooleanAndRemove(T name)
Headers
getBooleanAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a boolean.public boolean getBooleanAndRemove(T name, boolean defaultValue)
Headers
getBooleanAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there
is no such header or its value of header is not a boolean.public Byte getByteAndRemove(T name)
Headers
getByteAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a byte.public byte getByteAndRemove(T name, byte defaultValue)
Headers
getByteAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there is
no such header or its value of header is not a byte.public Character getCharAndRemove(T name)
Headers
getCharAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a char.public char getCharAndRemove(T name, char defaultValue)
Headers
getCharAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there is
no such header or its value of header is not a char.public Short getShortAndRemove(T name)
Headers
getShortAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a short.public short getShortAndRemove(T name, short defaultValue)
Headers
getShortAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there is
no such header or its value of header is not a short.public Integer getIntAndRemove(T name)
Headers
getIntAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no
such header or its value is not an integer.public int getIntAndRemove(T name, int defaultValue)
Headers
getIntAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there
is no such header or its value of header is not an integer.public Long getLongAndRemove(T name)
Headers
getLongAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a long.public long getLongAndRemove(T name, long defaultValue)
Headers
getLongAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there's no
such header or its value is not a long.public Float getFloatAndRemove(T name)
Headers
getFloatAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a float.public float getFloatAndRemove(T name, float defaultValue)
Headers
getFloatAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there's
no such header or its value is not a float.public Double getDoubleAndRemove(T name)
Headers
getDoubleAndRemove
in interface Headers<T>
name
- the name of the header to searchnull
if there's no such
header or its value is not a double.public double getDoubleAndRemove(T name, double defaultValue)
Headers
getDoubleAndRemove
in interface Headers<T>
name
- the name of the header to searchdefaultValue
- the default valuedefaultValue
if there's
no such header or its value is not a double.public Long getTimeMillisAndRemove(T name)
Headers
getTimeMillisAndRemove
in interface Headers<T>
name
- The name of the header to searchnull
if
there's no such header or its value is not a date.public long getTimeMillisAndRemove(T name, long defaultValue)
Headers
getTimeMillisAndRemove
in interface Headers<T>
name
- The name of the header to searchdefaultValue
- default valuedefaultValue
if there's no such header or its value is not a date.protected Headers.ValueConverter<T> valueConverter()
Copyright © 2008–2015 The Netty Project. All rights reserved.