Interface HeaderFields


public interface HeaderFields
Represents a bunch of header fields.

Use of(Set) or empty() to create an instance of a basic implementation of HeaderFields.

Author:
Martin Siegemund
  • Method Summary

    Modifier and Type Method Description
    static HeaderFields empty()
    Creates a new instance of HeaderFields which does not contain any fields.
    Collection<HeaderField> fields()
    Retrieve the header fields, represented as a Map whereas the key of every entry represents a header field's key and the value of every entry represents its associated header field's value.
    static HeaderFields of​(Set<? extends HeaderField> headerFields)
    Creates a new instance of HeaderFields.
  • Method Details

    • fields

      Retrieve the header fields, represented as a Map whereas the key of every entry represents a header field's key and the value of every entry represents its associated header field's value.
      Returns:
      the header fields
    • of

      static HeaderFields of​(Set<? extends HeaderField> headerFields)
      Creates a new instance of HeaderFields.
      Parameters:
      headerFields - a Set of HeaderField instances which represent the created instance
      Returns:
      a new instance
    • empty

      static HeaderFields empty()
      Creates a new instance of HeaderFields which does not contain any fields.
      Returns:
      a new and empty instance