B
- the generic typepublic interface HttpFields<B extends HttpFields<B>> extends Map<String,List<String>>
HeaderFields
as well as the FormFields
.
This interface represents this kind of data structure providing some common
convenience methods.Modifier and Type | Method and Description |
---|---|
default void |
addTo(Enum<?> aField,
List<String> aValues)
Same as
addTo(String, List) though using the provided
enumeration's Enum.toString() method to determine the key. |
default void |
addTo(Enum<?> aField,
String... aValues)
Same as
addTo(String, String ...) though using the provided
enumeration's Enum.toString() method to determine the key. |
default void |
addTo(Enum<?> aField,
String aValue)
Same as
addTo(String, String) though using the provided
enumeration's Enum.toString() method to determine the key. |
default void |
addTo(String aField,
List<String> aValues)
Adds values to the list of values associated with the given Header-Field
(key),.
|
default void |
addTo(String aField,
String... aValues)
Adds values to the list of values associated with the given Header-Field
(key),.
|
default void |
addTo(String aField,
String aValue)
Adds a value to the list of values associated with the given Header-Field
(key),.
|
default String |
getFirst(Enum<?> aField)
Same as
getFirst(String) though using the provided enumeration's
Enum.toString() method to determine the key. |
default String |
getFirst(String aField)
Returns the first Header-Field value in the list of values associated
with the given Header-Field.
|
default List<String> |
put(Enum<?> aField,
String... aValues)
Same as
put(String, String ... ) though using the provided
enumeration's Enum.toString() method to determine the key. |
default List<String> |
put(Enum<?> aField,
String aValue)
Same as
put(String, String) though using the provided
enumeration's Enum.toString() method to determine the key. |
default List<String> |
put(String aField,
String... aValues)
Performs a #set(String, String) on multiple values.
|
default List<String> |
put(String aField,
String aValue)
Sets a single value for the Header-Field (key).
|
default String |
toField(Enum<?> aField)
Same as
toField(String) though using the provided enumeration's
Enum.toString() method to determine the key. |
default String |
toField(String aKey)
This method returns a single
String (instead of returning a
List of String instances when calling
Map.get(Object) ) where the elements of the filed are separated by
the Delimiter.HTTP_HEADER_ELEMENTS and concatenated as a single
String . |
default B |
withAddTo(Enum<?> aField,
List<String> aValues)
Same as
withAddTo(String, List) though using the provided
enumeration's Enum.toString() method to determine the key. |
default B |
withAddTo(Enum<?> aField,
String... aValues)
Same as
withAddTo(String, String ...) though using the provided
enumeration's Enum.toString() method to determine the key. |
default B |
withAddTo(Enum<?> aField,
String aValue)
Same as
withAddTo(String, String) though using the provided
enumeration's Enum.toString() method to determine the key. |
default B |
withAddTo(String aField,
List<String> aValues)
Builder method for the
addTo(String, List) method. |
default B |
withAddTo(String aField,
String... aValues)
Builder method for the
addTo(String, String...) method. |
default B |
withAddTo(String aField,
String aValue)
Builder method for the
addTo(String, String) method. |
default B |
withPut(Enum<?> aField,
List<String> aValues)
Same as
withPut(String, List) though using the provided
enumeration's Enum.toString() method to determine the key. |
default B |
withPut(Enum<?> aField,
String... aValues)
Same as
withPut(String, String ...) though using the provided
enumeration's Enum.toString() method to determine the key. |
default B |
withPut(Enum<?> aField,
String aValue)
Same as
withPut(String, String) though using the provided
enumeration's Enum.toString() method to determine the key. |
default B |
withPut(String aField,
List<String> aValues)
Builder method for the
Map.put(Object, Object) method. |
default B |
withPut(String aField,
String... aValues)
Builder method for the
put(String, String...) method. |
default B |
withPut(String aField,
String aValue)
Builder method for the
put(String, String) method. |
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
default String getFirst(String aField)
aField
- The Header-Field (key) of which's values the first value is
to be retrieved.default String getFirst(Enum<?> aField)
getFirst(String)
though using the provided enumeration's
Enum.toString()
method to determine the key.aField
- the fieldgetFirst(String)
default List<String> put(String aField, String aValue)
aField
- The Header-Field for which to set a single value.aValue
- The single value to be set for the Header-Field (key).default List<String> put(Enum<?> aField, String aValue)
put(String, String)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValue
- the valueput(String, String)
default List<String> put(String aField, String... aValues)
aField
- The Header-Field for which to set the values.aValues
- The values to be set for the Header-Field (key).default List<String> put(Enum<?> aField, String... aValues)
put(String, String ... )
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valuesput(String, String ...)
default B withPut(String aField, String aValue)
put(String, String)
method.aField
- The Header-Field for which to set a single value.aValue
- The single value to be set for the Header-Field (key).HttpFields
instance to continue building up the
Header-Fields.default B withPut(Enum<?> aField, String aValue)
withPut(String, String)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValue
- the valuewithPut(String, String)
default B withPut(String aField, List<String> aValues)
Map.put(Object, Object)
method.aField
- The Header-Field for which to set the values.aValues
- The values to be set for the Header-Field (key).HttpFields
instance to continue building up the
Header-Fields.default B withPut(Enum<?> aField, List<String> aValues)
withPut(String, List)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valueswithPut(String, List)
default B withPut(String aField, String... aValues)
put(String, String...)
method.aField
- The Header-Field for which to set the values.aValues
- The values to be set for the Header-Field (key).HttpFields
instance to continue building up the
Header-Fields.default B withPut(Enum<?> aField, String... aValues)
withPut(String, String ...)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valueswithPut(String, String ...)
default void addTo(String aField, String aValue)
aField
- The Header-Field (key) of which's list of values a value is
to be added.aValue
- The value to be added to the list of values associated to
the given Header-Field (key).default void addTo(Enum<?> aField, String aValue)
addTo(String, String)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValue
- the valueaddTo(String, String)
default void addTo(String aField, String... aValues)
aField
- The Header-Field (key) of which's list of values the values
are to be added.aValues
- The values to be added to the list of values associated to
the given Header-Field (key).default void addTo(Enum<?> aField, String... aValues)
addTo(String, String ...)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valuesaddTo(String, String ...)
default void addTo(String aField, List<String> aValues)
aField
- The Header-Field (key) of which's list of values the values
are to be added.aValues
- The values to be added to the list of values associated to
the given Header-Field (key).default void addTo(Enum<?> aField, List<String> aValues)
addTo(String, List)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valuesaddTo(String, List)
default B withAddTo(String aField, String aValue)
addTo(String, String)
method.aField
- The Header-Field (key) of which's list of values a value is
to be added.aValue
- The value to be added to the list of values associated to
the given Header-Field (key).HttpFields
instance to continue building up the
Header-Fields.default B withAddTo(Enum<?> aField, String aValue)
withAddTo(String, String)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValue
- the valuewithAddTo(String, String)
default B withAddTo(String aField, String... aValues)
addTo(String, String...)
method.aField
- The Header-Field (key) of which's list of values the values
are to be added.aValues
- The values to be added to the list of values associated to
the given Header-Field (key).HttpFields
instance to continue building up the
Header-Fields.default B withAddTo(Enum<?> aField, String... aValues)
withAddTo(String, String ...)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valueswithAddTo(String, String ...)
default B withAddTo(String aField, List<String> aValues)
addTo(String, List)
method.aField
- The Header-Field (key) of which's list of values the values
are to be added.aValues
- The values to be added to the list of values associated to
the given Header-Field (key).HttpFields
instance to continue building up the
Header-Fields.default B withAddTo(Enum<?> aField, List<String> aValues)
withAddTo(String, List)
though using the provided
enumeration's Enum.toString()
method to determine the key.aField
- the fieldaValues
- the valuesaddTo(String, List)
default String toField(String aKey)
String
(instead of returning a
List
of String
instances when calling
Map.get(Object)
) where the elements of the filed are separated by
the Delimiter.HTTP_HEADER_ELEMENTS
and concatenated as a single
String
.default String toField(Enum<?> aField)
toField(String)
though using the provided enumeration's
Enum.toString()
method to determine the key.aField
- the fieldtoField(String)
Copyright © 2018. All rights reserved.