Package org.zalando.logbook
Interface HttpHeaders
An immutable multi-map representing HTTP headers. It offers three kinds of
operations:
update
is essentially Map.put(Object, Object)
, but returns
a new instance with the updated entries.
delete
is essentially Map.remove(Object)
, but returns a new
instance without the deleted headers.
apply
applies a function to all entries or a subset of them and
applies the changes. If the given operator returns a null value the entry
will be deleted otherwise updated.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionapply
(String name, UnaryOperator<List<String>> operator) apply
(Collection<String> names, BiFunction<String, List<String>, Collection<String>> operator) apply
(BiFunction<String, List<String>, Collection<String>> operator) apply
(BiPredicate<String, List<String>> predicate, BiFunction<String, List<String>, Collection<String>> operator) void
clear()
Deprecated.compute
(String key, BiFunction<? super String, ? super List<String>, ? extends List<String>> remappingFunction) Deprecated.Deprecated.computeIfPresent
(String key, BiFunction<? super String, ? super List<String>, ? extends List<String>> remappingFunction) Deprecated.delete
(Collection<String> names) delete
(BiPredicate<String, List<String>> predicate) static HttpHeaders
empty()
default String
merge
(String key, List<String> value, BiFunction<? super List<String>, ? super List<String>, ? extends List<String>> remappingFunction) Deprecated.static HttpHeaders
static HttpHeaders
static <T,
U> BiPredicate<T, U> Deprecated.void
Deprecated.putIfAbsent
(String key, List<String> value) Deprecated.Deprecated.boolean
Deprecated.Deprecated.boolean
Deprecated.void
replaceAll
(BiFunction<? super String, ? super List<String>, ? extends List<String>> function) Deprecated.update
(String name, Collection<String> value) Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, size, values
-
Method Details
-
update
-
update
-
update
-
apply
-
apply
@CheckReturnValue HttpHeaders apply(Collection<String> names, BiFunction<String, List<String>, Collection<String>> operator) -
apply
@CheckReturnValue HttpHeaders apply(BiPredicate<String, List<String>> predicate, BiFunction<String, List<String>, Collection<String>> operator) -
apply
-
delete
-
delete
-
delete
-
getFirst
-
empty
-
of
-
of
-
predicate
-
put
Deprecated. -
remove
Deprecated. -
putAll
Deprecated. -
clear
Deprecated. -
replaceAll
@Deprecated void replaceAll(BiFunction<? super String, ? super List<String>, ? extends List<String>> function) Deprecated.- Specified by:
replaceAll
in interfaceMap<String,
List<String>>
-
putIfAbsent
Deprecated.- Specified by:
putIfAbsent
in interfaceMap<String,
List<String>>
-
remove
Deprecated. -
replace
Deprecated. -
replace
Deprecated. -
computeIfAbsent
@Deprecated List<String> computeIfAbsent(String key, Function<? super String, ? extends List<String>> mappingFunction) Deprecated.- Specified by:
computeIfAbsent
in interfaceMap<String,
List<String>>
-
computeIfPresent
@Deprecated List<String> computeIfPresent(String key, BiFunction<? super String, ? super List<String>, ? extends List<String>> remappingFunction) Deprecated.- Specified by:
computeIfPresent
in interfaceMap<String,
List<String>>
-
compute
@Deprecated List<String> compute(String key, BiFunction<? super String, ? super List<String>, ? extends List<String>> remappingFunction) Deprecated. -
merge
@Deprecated List<String> merge(String key, List<String> value, BiFunction<? super List<String>, ? super List<String>, ? extends List<String>> remappingFunction) Deprecated.
-