Class AbstractHttpFields<T extends HttpFields<T>>
- Type Parameters:
T- The type of the sub-class, required for the builder methods such asHttpFields.withAddTo(String, String).
- All Implemented Interfaces:
Serializable, Cloneable, Map<String, List<String>>, HttpFields<T>
- Direct Known Subclasses:
AbstractHeaderFields, FormFields
public abstract class AbstractHttpFields<T extends HttpFields<T>>
extends HashMap<String, List<String>>
implements HttpFields<T>
Abstract implementation of the
HeaderFields type.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcopyHttpFields(Map<String, List<String>> aFromFields, HttpFields<?> aToFields) Copies the provided "from" fields into the provided "to" fields.Methods inherited from class HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface HttpFields
addAll, addTo, addTo, addTo, addTo, addTo, addTo, getFirst, getFirst, put, put, put, put, toField, toField, withAddTo, withAddTo, withAddTo, withAddTo, withAddTo, withAddTo, withPut, withPut, withPut, withPut, withPut, withPutMethods inherited from interface Map
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
-
Constructor Details
-
AbstractHttpFields
public AbstractHttpFields()Instantiates an empty instance. -
AbstractHttpFields
-
-
Method Details
-
copyHttpFields
protected static void copyHttpFields(Map<String, List<String>> aFromFields, HttpFields<?> aToFields) Copies the provided "from" fields into the provided "to" fields. Omits empty or null values.- Parameters:
aFromFields- The fields from which to copy.aToFields- The fields to which to copy.
-