Class ImmutableConditionalValue.Builder<T>

  • Enclosing class:
    ImmutableConditionalValue<T>

    @NotThreadSafe
    public static final class ImmutableConditionalValue.Builder<T>
    extends Object
    Builds instances of type ImmutableConditionalValue. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableConditionalValue.Builder<T> from​(ConditionalValue<T> instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.ConditionalValue instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableConditionalValue.Builder<T> from​(Value<T> instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.Value instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • when

        @CanIgnoreReturnValue
        public final ImmutableConditionalValue.Builder<T> when​(Expression when)
        Initializes the value for the when attribute.
        Parameters:
        when - The value for when
        Returns:
        this builder for use in a chained invocation
      • value

        @CanIgnoreReturnValue
        public final ImmutableConditionalValue.Builder<T> value​(@Nullable
                                                                T value)
        Initializes the value for the value attribute.
        Parameters:
        value - The value for value (can be null)
        Returns:
        this builder for use in a chained invocation
      • fallbackValue

        @CanIgnoreReturnValue
        public final ImmutableConditionalValue.Builder<T> fallbackValue​(@Nullable
                                                                        T fallbackValue)
        Initializes the value for the fallbackValue attribute.
        Parameters:
        fallbackValue - The value for fallbackValue (can be null)
        Returns:
        this builder for use in a chained invocation
      • valueType

        @CanIgnoreReturnValue
        public final ImmutableConditionalValue.Builder<T> valueType​(ValueType valueType)
        Initializes the value for the valueType attribute.
        Parameters:
        valueType - The value for valueType
        Returns:
        this builder for use in a chained invocation