- 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,FormFieldsImpl
public abstract class AbstractHttpFields<T extends HttpFields<T>> extends HashMap<String,List<String>> implements HttpFields<T>
Abstract implementation of the
HeaderFields type.- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object> -
Constructor Summary
Constructors Constructor Description AbstractHttpFields()Instantiates an empty instance.AbstractHttpFields(Map<String,List<String>> aHttpFields)Initializes the instance with the fields provided by the givenMap. -
Method Summary
Modifier and Type Method Description protected static voidcopyHttpFields(Map<String,List<String>> aFromFields, HttpFields<?> aToFields)Copies the provided "from" fields into the provided "to" fields.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.refcodes.web.HttpFields
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 java.util.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
-
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.
-