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 HeaderFieldsempty()Creates a new instance ofHeaderFieldswhich does not contain any fields.Collection<HeaderField>fields()Retrieve the header fields, represented as aMapwhereas thekeyof every entry represents a header field's key and thevalueof every entry represents its associated header field's value.static HeaderFieldsof(Set<? extends HeaderField> headerFields)Creates a new instance ofHeaderFields.
-
Method Details
-
fields
Collection<HeaderField> fields()Retrieve the header fields, represented as aMapwhereas thekeyof every entry represents a header field's key and thevalueof every entry represents its associated header field's value.- Returns:
- the header fields
-
of
Creates a new instance ofHeaderFields.- Parameters:
headerFields- aSetofHeaderFieldinstances which represent the created instance- Returns:
- a new instance
-
empty
Creates a new instance ofHeaderFieldswhich does not contain any fields.- Returns:
- a new and empty instance
-