public interface HttpFields<T extends HttpFields<T>> 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(String aField,
String aValue)
Adds a value to the list of values associated with the given header field
(key),
|
default String |
getFirst(String aField)
Returns the first header field value in the list of values associated
with the given header field.
|
default void |
set(String aField,
String aValue)
Sets a single value for the header field (key).
|
default T |
withAddTo(String aField,
String aValue)
Builder method for the
addTo(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 void set(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 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 T 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).HeaderFields
instance to continue building up the
header fields.Copyright © 2016. All rights reserved.