java.lang.Object
io.helidon.common.http.ReadOnlyParameters
io.helidon.common.http.ReadOnlyHeaders
- Direct Known Subclasses:
ReadableBodyPartHeaders
An immutable implementation of
Headers.
Factories for multi-maps passed to superclass constructors use TreeSet instead of a concurrency-tolerant
implementation because this is a read-only implementation.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReadOnlyHeaders(Parameters parameters) Returns an immutable deep copy of the providedParametersinstance.protectedReadOnlyHeaders(Map<String, List<String>> data) Returns an immutable deep copy of the provided multimap. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadOnlyHeadersCreates a new instance populated with the specifiedHeaderssettings.static ReadOnlyHeaderscreate(Parameters initialContent) Deprecated, for removal: This API element is subject to removal in a future version.protected static ReadOnlyHeadersCreates a newReadOnlyHeadersinstance with the specified multi-map contents as initial contents.static ReadOnlyHeadersempty()Returns an empty and immutable singleton.emptyMap()Creates an emptyMapsuitable (once populated) for read-only access.Creates an emptyMapsuitable (once populated) for read-only access, pre-sized as specified.Methods inherited from class io.helidon.common.http.ReadOnlyParameters
add, add, addAll, all, computeIfAbsent, computeSingleIfAbsent, first, iterator, put, put, putAll, putIfAbsent, putIfAbsent, remove, toMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface io.helidon.common.http.Parameters
add, add, addAll, computeIfAbsent, computeSingleIfAbsent, first, iterator, put, put, putAll, putIfAbsent, putIfAbsent, remove, toMap
-
Constructor Details
-
ReadOnlyHeaders
Returns an immutable deep copy of the provided multimap.- Parameters:
data- multi-map data to copy.
-
ReadOnlyHeaders
Returns an immutable deep copy of the providedParametersinstance.- Parameters:
parameters- parameters to copy.
-
-
Method Details
-
empty
Returns an empty and immutable singleton.- Returns:
- the headers singleton (empty and immutable)
-
create
Creates a newReadOnlyHeadersinstance with the specified multi-map contents as initial contents.- Parameters:
initialContent- multi-map contains name/values-list pairs for the initial content- Returns:
- new instance with the specified initial content
-
create
@Deprecated(since="3.0.3", forRemoval=true) public static ReadOnlyHeaders create(Parameters initialContent) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new instance populated with the specifiedParameterssettings.- Parameters:
initialContent-Parametersto be used as the initial content for the new instance- Returns:
- new instance with specified initial content
-
create
Creates a new instance populated with the specifiedHeaderssettings.- Parameters:
initialContent-Headersto be used as the initial content for the new instance- Returns:
- new instance with specified initial content
-
emptyMap
Description copied from class:ReadOnlyParametersCreates an emptyMapsuitable (once populated) for read-only access.- Overrides:
emptyMapin classReadOnlyParameters- Returns:
- empty
Map
-
emptyMapForCopy
Description copied from class:ReadOnlyParametersCreates an emptyMapsuitable (once populated) for read-only access, pre-sized as specified.- Overrides:
emptyMapForCopyin classReadOnlyParameters- Returns:
- empty
Map, possibly pre-sized as indicated
-
create(Headers)instead, passingHeadersinstead ofParameters.