@Immutable public interface HttpHeaders extends Map<String,List<String>>
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.
containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, size, values
@CheckReturnValue HttpHeaders update(String name, String... values)
@CheckReturnValue HttpHeaders update(String name, Collection<String> value)
@CheckReturnValue HttpHeaders update(Map<String,List<String>> headers)
@CheckReturnValue HttpHeaders apply(String name, UnaryOperator<List<String>> operator)
@CheckReturnValue HttpHeaders apply(Collection<String> names, BiFunction<String,List<String>,Collection<String>> operator)
@CheckReturnValue HttpHeaders apply(BiPredicate<String,List<String>> predicate, BiFunction<String,List<String>,Collection<String>> operator)
@CheckReturnValue HttpHeaders apply(BiFunction<String,List<String>,Collection<String>> operator)
@CheckReturnValue HttpHeaders delete(String... names)
@CheckReturnValue HttpHeaders delete(Collection<String> names)
@CheckReturnValue HttpHeaders delete(BiPredicate<String,List<String>> predicate)
static HttpHeaders empty()
static HttpHeaders of(String name, String... values)
static HttpHeaders of(Map<String,List<String>> headers)
static <T,U> BiPredicate<T,U> predicate(Predicate<T> predicate)
@Deprecated List<String> remove(Object key)
@Deprecated void putAll(Map<? extends String,? extends List<String>> m)
@Deprecated void clear()
@Deprecated void replaceAll(BiFunction<? super String,? super List<String>,? extends List<String>> function)
replaceAll
in interface Map<String,List<String>>
@Deprecated List<String> putIfAbsent(String key, List<String> value)
putIfAbsent
in interface Map<String,List<String>>
@Deprecated boolean remove(Object key, Object value)
@Deprecated boolean replace(String key, List<String> oldValue, List<String> newValue)
@Deprecated List<String> computeIfAbsent(String key, Function<? super String,? extends List<String>> mappingFunction)
computeIfAbsent
in interface Map<String,List<String>>
@Deprecated List<String> computeIfPresent(String key, BiFunction<? super String,? super List<String>,? extends List<String>> remappingFunction)
computeIfPresent
in interface Map<String,List<String>>
@Deprecated List<String> compute(String key, BiFunction<? super String,? super List<String>,? extends List<String>> remappingFunction)
Copyright © 2015–2021 Zalando SE. All rights reserved.