Package net.kyori.option
Interface OptionState.Builder
- Enclosing interface:
- OptionState
@NonExtendable
public static interface OptionState.Builder
A builder for option states.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a completed option state.Set the value for a specific option.values(OptionState existing) Apply all values from the existing option state.values(ValueSource source) Set a value for all options within theOptionState.schema()where a value is provided by thesource.
-
Method Details
-
value
Set the value for a specific option.- Type Parameters:
V- the value type- Parameters:
option- the option to set the value forvalue- the value- Returns:
- this builder
- Since:
- 1.0.0
-
values
Apply all values from the existing option state.- Parameters:
existing- the existing state- Returns:
- this builder
- Since:
- 1.0.0
-
values
Set a value for all options within theOptionState.schema()where a value is provided by thesource.- Parameters:
source- a source to populate values- Returns:
- this builder
- Since:
- 1.1.0
-
build
OptionState build()Create a completed option state.- Returns:
- the built state
- Since:
- 1.0.0
-