Interface HttpFields<B extends HttpFields<B>>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void addTo​(java.lang.Enum<?> aField, java.lang.String aValue)
      Same as addTo(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
      default void addTo​(java.lang.Enum<?> aField, java.lang.String... aValues)
      Same as addTo(String, String ...) though using the provided enumeration's Enum.toString() method to determine the key.
      default void addTo​(java.lang.Enum<?> aField, java.util.List<java.lang.String> aValues)
      Same as addTo(String, List) though using the provided enumeration's Enum.toString() method to determine the key.
      default void addTo​(java.lang.String aField, java.lang.String aValue)
      Adds a value to the list of values associated with the given Header-Field (key),.
      default void addTo​(java.lang.String aField, java.lang.String... aValues)
      Adds values to the list of values associated with the given Header-Field (key),.
      default void addTo​(java.lang.String aField, java.util.List<java.lang.String> aValues)
      Adds values to the list of values associated with the given Header-Field (key),.
      default java.lang.String getFirst​(java.lang.Enum<?> aField)
      Same as getFirst(String) though using the provided enumeration's Enum.toString() method to determine the key.
      default java.lang.String getFirst​(java.lang.String aField)
      Returns the first Header-Field value in the list of values associated with the given Header-Field.
      default java.util.List<java.lang.String> put​(java.lang.Enum<?> aField, java.lang.String aValue)
      Same as put(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
      default java.util.List<java.lang.String> put​(java.lang.Enum<?> aField, java.lang.String... aValues)
      Same as put(String, String ... ) though using the provided enumeration's Enum.toString() method to determine the key.
      default java.util.List<java.lang.String> put​(java.lang.String aField, java.lang.String aValue)
      Sets a single value for the Header-Field (key).
      default java.util.List<java.lang.String> put​(java.lang.String aField, java.lang.String... aValues)
      Performs a #set(String, String) on multiple values.
      default java.lang.String toField​(java.lang.Enum<?> aField)
      Same as toField(String) though using the provided enumeration's Enum.toString() method to determine the key.
      default java.lang.String toField​(java.lang.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​(java.lang.Enum<?> aField, java.lang.String aValue)
      Same as withAddTo(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
      default B withAddTo​(java.lang.Enum<?> aField, java.lang.String... aValues)
      Same as withAddTo(String, String ...) though using the provided enumeration's Enum.toString() method to determine the key.
      default B withAddTo​(java.lang.Enum<?> aField, java.util.List<java.lang.String> aValues)
      Same as withAddTo(String, List) though using the provided enumeration's Enum.toString() method to determine the key.
      default B withAddTo​(java.lang.String aField, java.lang.String aValue)
      Builder method for the addTo(String, String) method.
      default B withAddTo​(java.lang.String aField, java.lang.String... aValues)
      Builder method for the addTo(String, String...) method.
      default B withAddTo​(java.lang.String aField, java.util.List<java.lang.String> aValues)
      Builder method for the addTo(String, List) method.
      default B withPut​(java.lang.Enum<?> aField, java.lang.String aValue)
      Same as withPut(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
      default B withPut​(java.lang.Enum<?> aField, java.lang.String... aValues)
      Same as withPut(String, String ...) though using the provided enumeration's Enum.toString() method to determine the key.
      default B withPut​(java.lang.Enum<?> aField, java.util.List<java.lang.String> aValues)
      Same as withPut(String, List) though using the provided enumeration's Enum.toString() method to determine the key.
      default B withPut​(java.lang.String aField, java.lang.String aValue)
      Builder method for the put(String, String) method.
      default B withPut​(java.lang.String aField, java.lang.String... aValues)
      Builder method for the put(String, String...) method.
      default B withPut​(java.lang.String aField, java.util.List<java.lang.String> aValues)
      Builder method for the Map.put(Object, Object) method.
      • Methods 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
    • Method Detail

      • getFirst

        default java.lang.String getFirst​(java.lang.String aField)
        Returns the first Header-Field value in the list of values associated with the given Header-Field.
        Parameters:
        aField - The Header-Field (key) of which's values the first value is to be retrieved.
        Returns:
        The first value in the list of values associated to the given Header-Field (key).
      • getFirst

        default java.lang.String getFirst​(java.lang.Enum<?> aField)
        Same as getFirst(String) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        Returns:
        the first
        See Also:
        getFirst(String)
      • put

        default java.util.List<java.lang.String> put​(java.lang.String aField,
                                                     java.lang.String aValue)
        Sets a single value for the Header-Field (key). Any values previously associated to the given Header-Field (key) are lost.
        Parameters:
        aField - The Header-Field for which to set a single value.
        aValue - The single value to be set for the Header-Field (key).
        Returns:
        the list
      • put

        default java.util.List<java.lang.String> put​(java.lang.Enum<?> aField,
                                                     java.lang.String aValue)
        Same as put(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValue - the value
        Returns:
        the list
        See Also:
        put(String, String)
      • put

        default java.util.List<java.lang.String> put​(java.lang.String aField,
                                                     java.lang.String... aValues)
        Performs a #set(String, String) on multiple values.
        Parameters:
        aField - The Header-Field for which to set the values.
        aValues - The values to be set for the Header-Field (key).
        Returns:
        the list
      • put

        default java.util.List<java.lang.String> put​(java.lang.Enum<?> aField,
                                                     java.lang.String... aValues)
        Same as put(String, String ... ) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        Returns:
        the list
        See Also:
        put(String, String ...)
      • withPut

        default B withPut​(java.lang.String aField,
                          java.lang.String aValue)
        Builder method for the put(String, String) method.
        Parameters:
        aField - The Header-Field for which to set a single value.
        aValue - The single value to be set for the Header-Field (key).
        Returns:
        This HttpFields instance to continue building up the Header-Fields.
      • withPut

        default B withPut​(java.lang.Enum<?> aField,
                          java.lang.String aValue)
        Same as withPut(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValue - the value
        Returns:
        the b
        See Also:
        withPut(String, String)
      • withPut

        default B withPut​(java.lang.String aField,
                          java.util.List<java.lang.String> aValues)
        Builder method for the Map.put(Object, Object) method.
        Parameters:
        aField - The Header-Field for which to set the values.
        aValues - The values to be set for the Header-Field (key).
        Returns:
        This HttpFields instance to continue building up the Header-Fields.
      • withPut

        default B withPut​(java.lang.Enum<?> aField,
                          java.util.List<java.lang.String> aValues)
        Same as withPut(String, List) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        Returns:
        the b
        See Also:
        withPut(String, List)
      • withPut

        default B withPut​(java.lang.String aField,
                          java.lang.String... aValues)
        Builder method for the put(String, String...) method.
        Parameters:
        aField - The Header-Field for which to set the values.
        aValues - The values to be set for the Header-Field (key).
        Returns:
        This HttpFields instance to continue building up the Header-Fields.
      • withPut

        default B withPut​(java.lang.Enum<?> aField,
                          java.lang.String... aValues)
        Same as withPut(String, String ...) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        Returns:
        the b
        See Also:
        withPut(String, String ...)
      • addTo

        default void addTo​(java.lang.String aField,
                           java.lang.String aValue)
        Adds a value to the list of values associated with the given Header-Field (key),.
        Parameters:
        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).
      • addTo

        default void addTo​(java.lang.Enum<?> aField,
                           java.lang.String aValue)
        Same as addTo(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValue - the value
        See Also:
        addTo(String, String)
      • addTo

        default void addTo​(java.lang.String aField,
                           java.lang.String... aValues)
        Adds values to the list of values associated with the given Header-Field (key),.
        Parameters:
        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).
      • addTo

        default void addTo​(java.lang.Enum<?> aField,
                           java.lang.String... aValues)
        Same as addTo(String, String ...) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        See Also:
        addTo(String, String ...)
      • addTo

        default void addTo​(java.lang.String aField,
                           java.util.List<java.lang.String> aValues)
        Adds values to the list of values associated with the given Header-Field (key),.
        Parameters:
        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).
      • addTo

        default void addTo​(java.lang.Enum<?> aField,
                           java.util.List<java.lang.String> aValues)
        Same as addTo(String, List) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        See Also:
        addTo(String, List)
      • withAddTo

        default B withAddTo​(java.lang.String aField,
                            java.lang.String aValue)
        Builder method for the addTo(String, String) method.
        Parameters:
        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).
        Returns:
        This HttpFields instance to continue building up the Header-Fields.
      • withAddTo

        default B withAddTo​(java.lang.Enum<?> aField,
                            java.lang.String aValue)
        Same as withAddTo(String, String) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValue - the value
        Returns:
        the b
        See Also:
        withAddTo(String, String)
      • withAddTo

        default B withAddTo​(java.lang.String aField,
                            java.lang.String... aValues)
        Builder method for the addTo(String, String...) method.
        Parameters:
        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).
        Returns:
        This HttpFields instance to continue building up the Header-Fields.
      • withAddTo

        default B withAddTo​(java.lang.Enum<?> aField,
                            java.lang.String... aValues)
        Same as withAddTo(String, String ...) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        Returns:
        the b
        See Also:
        withAddTo(String, String ...)
      • withAddTo

        default B withAddTo​(java.lang.String aField,
                            java.util.List<java.lang.String> aValues)
        Builder method for the addTo(String, List) method.
        Parameters:
        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).
        Returns:
        This HttpFields instance to continue building up the Header-Fields.
      • withAddTo

        default B withAddTo​(java.lang.Enum<?> aField,
                            java.util.List<java.lang.String> aValues)
        Same as withAddTo(String, List) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        aValues - the values
        Returns:
        the b
        See Also:
        addTo(String, List)
      • toField

        default java.lang.String toField​(java.lang.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.
        Parameters:
        aKey - The field's key for which's elements to retrieve a comma separated String
        Returns:
        The comma separated String of the according elements or null if none such field was found.
      • toField

        default java.lang.String toField​(java.lang.Enum<?> aField)
        Same as toField(String) though using the provided enumeration's Enum.toString() method to determine the key.
        Parameters:
        aField - the field
        Returns:
        the string
        See Also:
        toField(String)