public static final class ImmutableContextSet.Builder extends Object
ImmutableContextSet.| Modifier and Type | Method and Description |
|---|---|
@NonNull ImmutableContextSet.Builder |
add(Map.Entry<String,String> entry)
Adds a context to the set.
|
@NonNull ImmutableContextSet.Builder |
add(@NonNull String key,
@NonNull String value)
Adds a context to the set.
|
@NonNull ImmutableContextSet.Builder |
addAll(@NonNull ContextSet contextSet)
Adds of of the contexts in another
ContextSet to the set. |
@NonNull ImmutableContextSet.Builder |
addAll(@NonNull Iterable<? extends Map.Entry<String,String>> iterable)
Adds the contexts contained in the given
Iterable to the set. |
@NonNull ImmutableContextSet.Builder |
addAll(@NonNull Map<String,String> map)
Adds the contexts contained in the given
Map to the set. |
@NonNull ImmutableContextSet.Builder |
addAll(@NonNull Multimap<String,String> multimap)
Adds the contexts contained in the given
Multimap to the set. |
@NonNull ImmutableContextSet |
build()
Creates a
ImmutableContextSet from the values previously
added to the builder. |
public @NonNull ImmutableContextSet.Builder add(@NonNull String key, @NonNull String value)
key - the key to addvalue - the value to addNullPointerException - if the key or value is nullMutableContextSet.add(String, String)public @NonNull ImmutableContextSet.Builder add(Map.Entry<String,String> entry)
entry - the entry to addNullPointerException - if the entry is nullMutableContextSet.add(Map.Entry)public @NonNull ImmutableContextSet.Builder addAll(@NonNull Iterable<? extends Map.Entry<String,String>> iterable)
Iterable to the set.iterable - an iterable of key value context pairsNullPointerException - if iterable is nullMutableContextSet.addAll(Iterable)public @NonNull ImmutableContextSet.Builder addAll(@NonNull Map<String,String> map)
Map to the set.map - the map to add fromNullPointerException - if the map is nullMutableContextSet.addAll(Map)public @NonNull ImmutableContextSet.Builder addAll(@NonNull Multimap<String,String> multimap)
Multimap to the set.multimap - the multimap to add fromNullPointerException - if the map is nullMutableContextSet.addAll(Multimap)public @NonNull ImmutableContextSet.Builder addAll(@NonNull ContextSet contextSet)
ContextSet to the set.contextSet - the set to add fromNullPointerException - if the contextSet is nullMutableContextSet.addAll(ContextSet)public @NonNull ImmutableContextSet build()
ImmutableContextSet from the values previously
added to the builder.ImmutableContextSet from the builder