Interface OptionState.Builder

Enclosing interface:
OptionState

@NonExtendable public static interface OptionState.Builder
A builder for option states.
Since:
1.0.0
  • Method Details

    • value

      <V> OptionState.Builder value(Option<V> option, @Nullable V value)
      Set the value for a specific option.
      Type Parameters:
      V - the value type
      Parameters:
      option - the option to set the value for
      value - the value
      Returns:
      this builder
      Since:
      1.0.0
    • values

      OptionState.Builder values(OptionState existing)
      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 the OptionState.schema() where a value is provided by the source.
      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