Class HttpFields.ImmutableHttpFields
- All Implemented Interfaces:
Iterable<HttpField>, Supplier<HttpFields>, HttpFields
- Enclosing interface:
HttpFields
-
Nested Class Summary
Nested classes/interfaces inherited from interface HttpFields
HttpFields.ImmutableHttpFields, HttpFields.Mutable, HttpFields.MutableHttpFields -
Field Summary
Fields inherited from interface HttpFields
CONNECTION_CLOSE, CONNECTION_KEEPALIVE, CONTENT_LENGTH_0, EMPTY, EXPIRES_01JAN1970 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImmutableHttpFields(HttpField[] fields, int size) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionReturns an immutable copy of thisHttpFieldsinstance.booleanReturns the encoded value of the first field with the given field name, ornullif no such field is present.get(HttpHeader header) Returns the encoded value of the first field with the given field name, ornullif no such header is present.getField(int index) Returns the firstHttpFieldwith the given field name, ornullif no such field is present.getField(HttpHeader header) Returns the firstHttpFieldwith the given field name, ornullif no such field is present.inthashCode()listIterator(int index) intsize()stream()toString()Methods inherited from interface HttpFields
asString, contains, contains, contains, contains, contains, contains, containsLast, get, getCSV, getCSV, getDateField, getDateField, getFieldNames, getFieldNamesCollection, getFields, getFields, getLast, getLongField, getLongField, getQualityCSV, getQualityCSV, getQualityCSV, getValues, getValuesList, getValuesList, isEqualTo, iterator, listIteratorMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
ImmutableHttpFields
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
asImmutable
Description copied from interface:HttpFieldsReturns an immutable copy of this
HttpFieldsinstance.- Specified by:
asImmutablein interfaceHttpFields- Returns:
- a new immutable copy of this
HttpFieldsinstance
-
hashCode
-
equals
-
get
Description copied from interface:HttpFieldsReturns the encoded value of the first field with the given field name, or
nullif no such field is present.The comparison of field name is case-insensitive via
HttpField.is(String). If possible, it is more efficient to useHttpFields.get(HttpHeader).In case of multi-valued fields, the returned value is the encoded value, including commas and quotes, as returned by
HttpField.getValue().- Specified by:
getin interfaceHttpFields- Parameters:
name- the case-insensitive field name to search for- Returns:
- the raw value of the first field with the given field name,
or
nullif no such field is present - See Also:
-
get
Description copied from interface:HttpFieldsReturns the encoded value of the first field with the given field name, or
nullif no such header is present.In case of multi-valued fields, the returned value is the encoded value, including commas and quotes, as returned by
HttpField.getValue().- Specified by:
getin interfaceHttpFields- Parameters:
header- the field name to search for- Returns:
- the raw value of the first field with the given field name,
or
nullif no such header is present - See Also:
-
getField
Description copied from interface:HttpFieldsReturns the first
HttpFieldwith the given field name, ornullif no such field is present.- Specified by:
getFieldin interfaceHttpFields- Parameters:
header- the field name to search for- Returns:
- the first
HttpFieldwith the given field name, ornullif no such field is present
-
getField
Description copied from interface:HttpFieldsReturns the first
HttpFieldwith the given field name, ornullif no such field is present.The comparison of field name is case-insensitive via
HttpField.is(String).- Specified by:
getFieldin interfaceHttpFields- Parameters:
name- the case-insensitive field name to search for- Returns:
- the first
HttpFieldwith the given field name, ornullif no such field is present
-
getField
Description copied from interface:HttpFieldsReturns the
HttpFieldat the givenindex, ornullif there is no field at the given index.- Specified by:
getFieldin interfaceHttpFields- Parameters:
index- the index of theHttpField- Returns:
- the
HttpFieldat the givenindex, ornullif there is no field at the given index
-
listIterator
- Specified by:
listIteratorin interfaceHttpFields- Returns:
- an iterator over the
HttpFields in thisHttpFieldsstarting at the given index. - See Also:
-
size
public int size()- Specified by:
sizein interfaceHttpFields- Returns:
- the number of
HttpFields in this instance
-
stream
- Specified by:
streamin interfaceHttpFields- Returns:
- a sequential stream of the
HttpFields in this instance
-
toString
-