public interface MutableContextSet extends ContextSet
ContextSet.| Modifier and Type | Method and Description |
|---|---|
default void |
add(@NonNull Context entry)
Adds a context to this set.
|
void |
add(@NonNull String key,
@NonNull String value)
Adds a context to this set.
|
void |
addAll(@NonNull ContextSet contextSet)
Adds of of the contexts in another
ContextSet to this set. |
default void |
addAll(@NonNull Iterable<Context> iterable)
Adds the contexts contained in the given
Iterable to this set. |
void |
clear()
Removes all contexts from the set.
|
static @NonNull MutableContextSet |
create()
Creates a new empty MutableContextSet.
|
static @NonNull MutableContextSet |
of(@NonNull String key,
@NonNull String value)
Creates a
MutableContextSet from a context pair. |
void |
remove(@NonNull String key,
@NonNull String value)
Removes a context from this set.
|
void |
removeAll(@NonNull String key)
Removes all contexts from this set with the given key.
|
contains, contains, containsAny, containsKey, getAnyValue, getValues, immutableCopy, isEmpty, isImmutable, isSatisfiedBy, isSatisfiedBy, iterator, mutableCopy, size, toFlattenedMap, toMap, toSetforEach, spliteratorstatic @NonNull MutableContextSet create()
static @NonNull MutableContextSet of(@NonNull String key, @NonNull String value)
MutableContextSet from a context pair.key - the keyvalue - the valueNullPointerException - if key or value is nullvoid add(@NonNull String key, @NonNull String value)
key - the key to addvalue - the value to addNullPointerException - if the key or value is nulldefault void add(@NonNull Context entry)
entry - the entry to addNullPointerException - if the entry is nulldefault void addAll(@NonNull Iterable<Context> iterable)
Iterable to this set.iterable - an iterable of key value context pairsNullPointerException - if iterable is nullvoid addAll(@NonNull ContextSet contextSet)
ContextSet to this set.contextSet - the set to add fromNullPointerException - if the contextSet is nullvoid remove(@NonNull String key, @NonNull String value)
key - the key to removevalue - the value to removeNullPointerException - if the key or value is nullvoid removeAll(@NonNull String key)
key - the key to removeNullPointerException - if the key is nullvoid clear()