Class ImmutableConditionalValue.Builder<T>
java.lang.Object
io.dialob.session.engine.program.model.ImmutableConditionalValue.Builder<T>
- Enclosing class:
ImmutableConditionalValue<T>
@Generated(from="ConditionalValue",
generator="Immutables")
@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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableConditionalValue.fallbackValue(T fallbackValue) Initializes the value for thefallbackValueattribute.from(ConditionalValue<T> instance) Fill a builder with attribute values from the providedio.dialob.session.engine.program.model.ConditionalValueinstance.Fill a builder with attribute values from the providedio.dialob.session.engine.program.model.Valueinstance.Initializes the value for thevalueattribute.Initializes the value for thevalueTypeattribute.when(Expression when) Initializes the value for thewhenattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.dialob.session.engine.program.model.Valueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableConditionalValue.Builder<T> from(ConditionalValue<T> instance) Fill a builder with attribute values from the providedio.dialob.session.engine.program.model.ConditionalValueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
when
Initializes the value for thewhenattribute.- Parameters:
when- The value for when- Returns:
thisbuilder for use in a chained invocation
-
value
Initializes the value for thevalueattribute.- Parameters:
value- The value for value (can benull)- Returns:
thisbuilder for use in a chained invocation
-
fallbackValue
@CanIgnoreReturnValue public final ImmutableConditionalValue.Builder<T> fallbackValue(@Nullable T fallbackValue) Initializes the value for thefallbackValueattribute.- Parameters:
fallbackValue- The value for fallbackValue (can benull)- Returns:
thisbuilder for use in a chained invocation
-
valueType
@CanIgnoreReturnValue public final ImmutableConditionalValue.Builder<T> valueType(ValueType valueType) Initializes the value for thevalueTypeattribute.- Parameters:
valueType- The value for valueType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableConditionalValue.- Returns:
- An immutable instance of ConditionalValue
- Throws:
IllegalStateException- if any required attributes are missing
-