Class EmptyHeaders<K,V,T extends Headers<K,V,T>>
- java.lang.Object
-
- io.netty5.handler.codec.EmptyHeaders<K,V,T>
-
-
Constructor Summary
Constructors Constructor Description EmptyHeaders()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tadd(Headers<? extends K,? extends V,?> headers)Adds all header names and values ofheadersto this object.Tadd(K name, Iterable<? extends V> values)Adds new headers with the specifiednameandvalues.Tadd(K name, V value)Adds a new header with the specifiednameandvalue.Tadd(K name, V... values)Adds new headers with the specifiednameandvalues.TaddBoolean(K name, boolean value)Adds a new header.TaddByte(K name, byte value)Adds a new header.TaddChar(K name, char value)Adds a new header.TaddDouble(K name, double value)Adds a new header.TaddFloat(K name, float value)Adds a new header.TaddInt(K name, int value)Adds a new header.TaddLong(K name, long value)Adds a new header.TaddObject(K name, Iterable<?> values)Adds a new header with the specified name and values.TaddObject(K name, Object value)Adds a new header.TaddObject(K name, Object... values)Adds a new header with the specified name and values.TaddShort(K name, short value)Adds a new header.TaddTimeMillis(K name, long value)Adds a new header.Tclear()Removes all headers.booleancontains(K name)Returnstrueif a header with thenameexists,falseotherwise.booleancontains(K name, V value)Returnstrueif a header with thenameandvalueexists,falseotherwise.booleancontainsBoolean(K name, boolean value)Returnstrueif a header with the name and value exists.booleancontainsByte(K name, byte value)Returnstrueif a header with the name and value exists.booleancontainsChar(K name, char value)Returnstrueif a header with the name and value exists.booleancontainsDouble(K name, double value)Returnstrueif a header with the name and value exists.booleancontainsFloat(K name, float value)Returnstrueif a header with the name and value exists.booleancontainsInt(K name, int value)Returnstrueif a header with the name and value exists.booleancontainsLong(K name, long value)Returnstrueif a header with the name and value exists.booleancontainsObject(K name, Object value)Returnstrueif a header with the name and value exists.booleancontainsShort(K name, short value)Returnstrueif a header with the name and value exists.booleancontainsTimeMillis(K name, long value)Returnstrueif a header with the name and value exists.booleanequals(Object o)Vget(K name)Returns the value of a header with the specified name.Vget(K name, V defaultValue)Returns the value of a header with the specified name.List<V>getAll(K name)Returns all values for the header with the specified name.List<V>getAllAndRemove(K name)Returns all values for the header with the specified name and removes them from this object.VgetAndRemove(K name)Returns the value of a header with the specified name and removes it from this object.VgetAndRemove(K name, V defaultValue)Returns the value of a header with the specified name and removes it from this object.BooleangetBoolean(K name)Returns thebooleanvalue of a header with the specified name.booleangetBoolean(K name, boolean defaultValue)Returns thebooleanvalue of a header with the specified name.BooleangetBooleanAndRemove(K name)Returns thebooleanvalue of a header with the specifiednameand removes the header from this object.booleangetBooleanAndRemove(K name, boolean defaultValue)Returns thebooleanvalue of a header with the specifiednameand removes the header from this object.BytegetByte(K name)Returns thebytevalue of a header with the specified name.bytegetByte(K name, byte defaultValue)Returns thebytevalue of a header with the specified name.BytegetByteAndRemove(K name)Returns thebytevalue of a header with the specifiednameand removes the header from this object.bytegetByteAndRemove(K name, byte defaultValue)Returns thebytevalue of a header with the specifiednameand removes the header from this object.CharactergetChar(K name)Returns thecharvalue of a header with the specified name.chargetChar(K name, char defaultValue)Returns thecharvalue of a header with the specified name.CharactergetCharAndRemove(K name)Returns thecharvalue of a header with the specifiednameand removes the header from this object.chargetCharAndRemove(K name, char defaultValue)Returns thecharvalue of a header with the specifiednameand removes the header from this object.DoublegetDouble(K name)Returns thedoublevalue of a header with the specified name.doublegetDouble(K name, double defaultValue)Returns thedoublevalue of a header with the specified name.DoublegetDoubleAndRemove(K name)Returns thedoublevalue of a header with the specifiednameand removes the header from this object.doublegetDoubleAndRemove(K name, double defaultValue)Returns thedoublevalue of a header with the specifiednameand removes the header from this object.FloatgetFloat(K name)Returns thefloatvalue of a header with the specified name.floatgetFloat(K name, float defaultValue)Returns thefloatvalue of a header with the specified name.FloatgetFloatAndRemove(K name)Returns thefloatvalue of a header with the specifiednameand removes the header from this object.floatgetFloatAndRemove(K name, float defaultValue)Returns thefloatvalue of a header with the specifiednameand removes the header from this object.IntegergetInt(K name)Returns theintvalue of a header with the specified name.intgetInt(K name, int defaultValue)Returns theintvalue of a header with the specified name.IntegergetIntAndRemove(K name)Returns theintvalue of a header with the specifiednameand removes the header from this object.intgetIntAndRemove(K name, int defaultValue)Returns theintvalue of a header with the specifiednameand removes the header from this object.LonggetLong(K name)Returns thelongvalue of a header with the specified name.longgetLong(K name, long defaultValue)Returns thelongvalue of a header with the specified name.LonggetLongAndRemove(K name)Returns thelongvalue of a header with the specifiednameand removes the header from this object.longgetLongAndRemove(K name, long defaultValue)Returns thelongvalue of a header with the specifiednameand removes the header from this object.ShortgetShort(K name)Returns theshortvalue of a header with the specified name.shortgetShort(K name, short defaultValue)Returns theshortvalue of a header with the specified name.ShortgetShortAndRemove(K name)Returns theshortvalue of a header with the specifiednameand removes the header from this object.shortgetShortAndRemove(K name, short defaultValue)Returns theshortvalue of a header with the specifiednameand removes the header from this object.LonggetTimeMillis(K name)Returns the value of a header with the specified name in milliseconds.longgetTimeMillis(K name, long defaultValue)Returns the value of a header with the specified name in milliseconds.LonggetTimeMillisAndRemove(K name)Returns the value of a header with the specifiednamein milliseconds and removes the header from this object.longgetTimeMillisAndRemove(K name, long defaultValue)Returns the value of a header with the specifiednamein milliseconds and removes the header from this object.inthashCode()booleanisEmpty()Iterator<Map.Entry<K,V>>iterator()Set<K>names()Returns aSetof all header names in this object.booleanremove(K name)Removes all headers with the specifiedname.Tset(Headers<? extends K,? extends V,?> headers)Clears the current header entries and copies all header entries of the specifiedheaders.Tset(K name, Iterable<? extends V> values)Sets a new header with the specified name and values.Tset(K name, V value)Sets a header with the specified name and value.Tset(K name, V... values)Sets a header with the specified name and values.TsetAll(Headers<? extends K,? extends V,?> headers)Retains all current headers but calls#set(K, V)for each entry inheaders.TsetBoolean(K name, boolean value)Set thenametovalue.TsetByte(K name, byte value)Set thenametovalue.TsetChar(K name, char value)Set thenametovalue.TsetDouble(K name, double value)Set thenametovalue.TsetFloat(K name, float value)Set thenametovalue.TsetInt(K name, int value)Set thenametovalue.TsetLong(K name, long value)Set thenametovalue.TsetObject(K name, Iterable<?> values)Sets a header with the specified name and values.TsetObject(K name, Object value)Sets a new header.TsetObject(K name, Object... values)Sets a header with the specified name and values.TsetShort(K name, short value)Set thenametovalue.TsetTimeMillis(K name, long value)Set thenametovalue.intsize()Returns the number of headers in this object.StringtoString()Iterator<V>valueIterator(K name)Equivalent togetAll(Object)but no intermediate list is generated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
get
public V get(K name)
Description copied from interface:HeadersReturns 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.
-
get
public V get(K name, V defaultValue)
Description copied from interface:HeadersReturns 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.
-
getAndRemove
public V getAndRemove(K name)
Description copied from interface:HeadersReturns 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.
-
getAndRemove
public V getAndRemove(K name, V defaultValue)
Description copied from interface:HeadersReturns 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.
-
getAll
public List<V> getAll(K name)
Description copied from interface:HeadersReturns all values for the header with the specified name. The returnedListcan't be modified.
-
getAllAndRemove
public List<V> getAllAndRemove(K name)
Description copied from interface:HeadersReturns all values for the header with the specified name and removes them from this object. The returnedListcan't be modified.
-
getBoolean
public Boolean getBoolean(K name)
Description copied from interface:HeadersReturns thebooleanvalue 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.
-
getBoolean
public boolean getBoolean(K name, boolean defaultValue)
Description copied from interface:HeadersReturns thebooleanvalue 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:
getBooleanin interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
booleanvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted toboolean.
-
getByte
public Byte getByte(K name)
Description copied from interface:HeadersReturns thebytevalue 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.
-
getByte
public byte getByte(K name, byte defaultValue)
Description copied from interface:HeadersReturns thebytevalue 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:
getBytein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
bytevalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tobyte.
-
getChar
public Character getChar(K name)
Description copied from interface:HeadersReturns thecharvalue 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.
-
getChar
public char getChar(K name, char defaultValue)
Description copied from interface:HeadersReturns thecharvalue 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:
getCharin interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
charvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tochar.
-
getShort
public Short getShort(K name)
Description copied from interface:HeadersReturns theshortvalue 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.
-
getShort
public short getShort(K name, short defaultValue)
Description copied from interface:HeadersReturns theshortvalue 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:
getShortin interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
shortvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted toshort.
-
getInt
public Integer getInt(K name)
Description copied from interface:HeadersReturns theintvalue 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.
-
getInt
public int getInt(K name, int defaultValue)
Description copied from interface:HeadersReturns theintvalue 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.
-
getLong
public Long getLong(K name)
Description copied from interface:HeadersReturns thelongvalue 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.
-
getLong
public long getLong(K name, long defaultValue)
Description copied from interface:HeadersReturns thelongvalue 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:
getLongin interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
longvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tolong.
-
getFloat
public Float getFloat(K name)
Description copied from interface:HeadersReturns thefloatvalue 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.
-
getFloat
public float getFloat(K name, float defaultValue)
Description copied from interface:HeadersReturns thefloatvalue 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:
getFloatin interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
floatvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tofloat.
-
getDouble
public Double getDouble(K name)
Description copied from interface:HeadersReturns thedoublevalue 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.
-
getDouble
public double getDouble(K name, double defaultValue)
Description copied from interface:HeadersReturns thedoublevalue 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:
getDoublein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the
doublevalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted todouble.
-
getTimeMillis
public Long getTimeMillis(K name)
Description copied from interface:HeadersReturns 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.
-
getTimeMillis
public long getTimeMillis(K name, long defaultValue)
Description copied from interface:HeadersReturns 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:
getTimeMillisin interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the milliseconds value of the first value in insertion order or
defaultValueif there is no such value or it can't be converted to milliseconds.
-
getBooleanAndRemove
public Boolean getBooleanAndRemove(K name)
Description copied from interface:HeadersReturns thebooleanvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getBooleanAndRemove
public boolean getBooleanAndRemove(K name, boolean defaultValue)
Description copied from interface:HeadersReturns thebooleanvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getBooleanAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
booleanvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted toboolean.
-
getByteAndRemove
public Byte getByteAndRemove(K name)
Description copied from interface:HeadersReturns thebytevalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getByteAndRemove
public byte getByteAndRemove(K name, byte defaultValue)
Description copied from interface:HeadersReturns thebytevalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getByteAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
bytevalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tobyte.
-
getCharAndRemove
public Character getCharAndRemove(K name)
Description copied from interface:HeadersReturns thecharvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getCharAndRemove
public char getCharAndRemove(K name, char defaultValue)
Description copied from interface:HeadersReturns thecharvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getCharAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
charvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tochar.
-
getShortAndRemove
public Short getShortAndRemove(K name)
Description copied from interface:HeadersReturns theshortvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getShortAndRemove
public short getShortAndRemove(K name, short defaultValue)
Description copied from interface:HeadersReturns theshortvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getShortAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
shortvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted toshort.
-
getIntAndRemove
public Integer getIntAndRemove(K name)
Description copied from interface:HeadersReturns theintvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getIntAndRemove
public int getIntAndRemove(K name, int defaultValue)
Description copied from interface:HeadersReturns theintvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getIntAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
intvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted toint.
-
getLongAndRemove
public Long getLongAndRemove(K name)
Description copied from interface:HeadersReturns thelongvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getLongAndRemove
public long getLongAndRemove(K name, long defaultValue)
Description copied from interface:HeadersReturns thelongvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getLongAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
longvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tolong.
-
getFloatAndRemove
public Float getFloatAndRemove(K name)
Description copied from interface:HeadersReturns thefloatvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getFloatAndRemove
public float getFloatAndRemove(K name, float defaultValue)
Description copied from interface:HeadersReturns thefloatvalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getFloatAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
floatvalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted tofloat.
-
getDoubleAndRemove
public Double getDoubleAndRemove(K name)
Description copied from interface:HeadersReturns thedoublevalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getDoubleAndRemove
public double getDoubleAndRemove(K name, double defaultValue)
Description copied from interface:HeadersReturns thedoublevalue of a header with the specifiednameand 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 fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getDoubleAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to searchdefaultValue- the default value- Returns:
- the
doublevalue of the first value in insertion order ordefaultValueif there is no such value or it can't be converted todouble.
-
getTimeMillisAndRemove
public Long getTimeMillisAndRemove(K name)
Description copied from interface:HeadersReturns the value of a header with the specifiednamein milliseconds and removes the header from this object. If there is more than one value for the specifiedname, the first value in insertion order is returned. In any case all values fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.
-
getTimeMillisAndRemove
public long getTimeMillisAndRemove(K name, long defaultValue)
Description copied from interface:HeadersReturns the value of a header with the specifiednamein milliseconds and removes the header from this object. If there is more than one value for the specifiedname, the first value in insertion order is returned. In any case all values fornameare removed.If an exception occurs during the translation from type
Tall entries withnamemay still be removed.- Specified by:
getTimeMillisAndRemovein interfaceHeaders<K,V,T extends Headers<K,V,T>>- Parameters:
name- the name of the header to retrievedefaultValue- the default value- Returns:
- the milliseconds value of the first value in insertion order or
defaultValueif there is no such value or it can't be converted to milliseconds.
-
contains
public boolean contains(K name)
Description copied from interface:HeadersReturnstrueif a header with thenameexists,falseotherwise.
-
contains
public boolean contains(K name, V value)
Description copied from interface:HeadersReturnstrueif a header with thenameandvalueexists,falseotherwise.The
Object.equals(Object)method is used to test for equality ofvalue.
-
containsObject
public boolean containsObject(K name, Object value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsBoolean
public boolean containsBoolean(K name, boolean value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsByte
public boolean containsByte(K name, byte value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsChar
public boolean containsChar(K name, char value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsShort
public boolean containsShort(K name, short value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsInt
public boolean containsInt(K name, int value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsLong
public boolean containsLong(K name, long value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsFloat
public boolean containsFloat(K name, float value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsDouble
public boolean containsDouble(K name, double value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
containsTimeMillis
public boolean containsTimeMillis(K name, long value)
Description copied from interface:HeadersReturnstrueif a header with the name and value exists.
-
size
public int size()
Description copied from interface:HeadersReturns the number of headers in this object.
-
isEmpty
public boolean isEmpty()
Description copied from interface:Headers
-
add
public T add(K name, V value)
Description copied from interface:HeadersAdds a new header with the specifiednameandvalue.
-
add
public T add(K name, Iterable<? extends V> values)
Description copied from interface:HeadersAdds new headers with the specifiednameandvalues. This method is semantically equivalent tofor (T value : values) { headers.add(name, value); }
-
add
public T add(K name, V... values)
Description copied from interface:HeadersAdds new headers with the specifiednameandvalues. This method is semantically equivalent tofor (T value : values) { headers.add(name, value); }
-
addObject
public T addObject(K name, Object value)
Description copied from interface:HeadersAdds a new header. Before thevalueis added, it's converted to typeT.
-
addObject
public T addObject(K name, Iterable<?> values)
Description copied from interface:HeadersAdds a new header with the specified name and values. This method is equivalent tofor (Object v : values) { headers.addObject(name, v); }
-
addObject
public T addObject(K name, Object... values)
Description copied from interface:HeadersAdds a new header with the specified name and values. This method is equivalent tofor (Object v : values) { headers.addObject(name, v); }
-
addBoolean
public T addBoolean(K name, boolean value)
Description copied from interface:HeadersAdds a new header.
-
addByte
public T addByte(K name, byte value)
Description copied from interface:HeadersAdds a new header.
-
addChar
public T addChar(K name, char value)
Description copied from interface:HeadersAdds a new header.
-
addShort
public T addShort(K name, short value)
Description copied from interface:HeadersAdds a new header.
-
addInt
public T addInt(K name, int value)
Description copied from interface:HeadersAdds a new header.
-
addLong
public T addLong(K name, long value)
Description copied from interface:HeadersAdds a new header.
-
addFloat
public T addFloat(K name, float value)
Description copied from interface:HeadersAdds a new header.
-
addDouble
public T addDouble(K name, double value)
Description copied from interface:HeadersAdds a new header.
-
addTimeMillis
public T addTimeMillis(K name, long value)
Description copied from interface:HeadersAdds a new header.
-
add
public T add(Headers<? extends K,? extends V,?> headers)
Description copied from interface:HeadersAdds all header names and values ofheadersto this object.
-
set
public T set(K name, V value)
Description copied from interface:HeadersSets a header with the specified name and value. Any existing headers with the same name are overwritten.
-
set
public T set(K name, Iterable<? extends V> values)
Description copied from interface:HeadersSets a new header with the specified name and values. This method is equivalent tofor (T v : values) { headers.addObject(name, v); }
-
set
public T set(K name, V... values)
Description copied from interface:HeadersSets 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); }
-
setObject
public T setObject(K name, Object value)
Description copied from interface:HeadersSets a new header. Any existing headers with this name are removed. Before thevalueis add, it's converted to typeT.
-
setObject
public T setObject(K name, Iterable<?> values)
Description copied from interface:HeadersSets 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); }
-
setObject
public T setObject(K name, Object... values)
Description copied from interface:HeadersSets 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); }
-
setBoolean
public T setBoolean(K name, boolean value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setByte
public T setByte(K name, byte value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setChar
public T setChar(K name, char value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setShort
public T setShort(K name, short value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setInt
public T setInt(K name, int value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setLong
public T setLong(K name, long value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setFloat
public T setFloat(K name, float value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setDouble
public T setDouble(K name, double value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
setTimeMillis
public T setTimeMillis(K name, long value)
Description copied from interface:HeadersSet thenametovalue. This will remove all previous values associated withname.
-
set
public T set(Headers<? extends K,? extends V,?> headers)
Description copied from interface:HeadersClears the current header entries and copies all header entries of the specifiedheaders.
-
setAll
public T setAll(Headers<? extends K,? extends V,?> headers)
Description copied from interface:HeadersRetains all current headers but calls#set(K, V)for each entry inheaders.
-
remove
public boolean remove(K name)
Description copied from interface:HeadersRemoves all headers with the specifiedname.
-
clear
public T clear()
Description copied from interface:HeadersRemoves all headers. After a call to this methodHeaders.size()equals0.
-
valueIterator
public Iterator<V> valueIterator(K name)
Equivalent togetAll(Object)but no intermediate list is generated.- Parameters:
name- the name of the header to retrieve- Returns:
- an
Iteratorof header values corresponding toname.
-
-