Package net.luckperms.api.context
Interface ImmutableContextSet.Builder
- Enclosing interface:
- ImmutableContextSet
public static interface ImmutableContextSet.Builder
A builder for
ImmutableContextSet.-
Method Summary
Modifier and TypeMethodDescriptionAdds a context to the set.default @NonNull ImmutableContextSet.BuilderAdds a context to the set.default @NonNull ImmutableContextSet.BuilderAdds the contexts contained in the givenIterableto the set.addAll(@NonNull ContextSet contextSet) Adds all the contexts in anotherContextSetto the set.build()Creates aImmutableContextSetfrom the values previously added to the builder.
-
Method Details
-
add
Adds a context to the set.- Parameters:
key- the key to addvalue- the value to add- Returns:
- the builder
- Throws:
NullPointerException- if the key or value is null- See Also:
-
add
Adds a context to the set.- Parameters:
entry- the entry to add- Returns:
- the builder
- Throws:
NullPointerException- if the entry is null- See Also:
-
addAll
Adds the contexts contained in the givenIterableto the set.- Parameters:
iterable- an iterable of key value context pairs- Returns:
- the builder
- Throws:
NullPointerException- if iterable is null- See Also:
-
addAll
Adds all the contexts in anotherContextSetto the set.- Parameters:
contextSet- the set to add from- Returns:
- the builder
- Throws:
NullPointerException- if the contextSet is null- See Also:
-
build
@NonNull ImmutableContextSet build()Creates aImmutableContextSetfrom the values previously added to the builder.- Returns:
- an
ImmutableContextSetfrom the builder
-