Interface Value.Builder<T>

Type Parameters:
T - the value type
Enclosing interface:
Value<T>

public static interface Value.Builder<T>
Builds a Value instance.
  • Method Details

    • initialValue

      Value.Builder<T> initialValue(T initialValue)
      Parameters:
      initialValue - the initial value
      Returns:
      this builder instance
    • notify

      Value.Builder<T> notify(Value.Notify notify)
      Parameters:
      notify - the notify policy for this value, default Value.Notify.WHEN_CHANGED
      Returns:
      this builder instance
    • validator

      Value.Builder<T> validator(Value.Validator<T> validator)
      Adds a validator to the resulting value
      Parameters:
      validator - the validator to add
      Returns:
      this builder instance
    • link

      Value.Builder<T> link(Value<T> originalValue)
      Links the given value to the resulting value
      Parameters:
      originalValue - the original value to link
      Returns:
      this builder instance
      See Also:
    • link

      Value.Builder<T> link(ValueObserver<T> originalValue)
      Links the given value observer to the resulting value
      Parameters:
      originalValue - the value to link
      Returns:
      this builder instance
      See Also:
    • build

      Value<T> build()
      Returns:
      a new Value instance based on this builder