Package io.dialob.api.form
Class ImmutableVariable.Builder
java.lang.Object
io.dialob.api.form.ImmutableVariable.Builder
- Enclosing class:
- ImmutableVariable
Builds instances of type
ImmutableVariable.
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 newImmutableVariable.Initializes the value for thecontextattribute.contextType(String contextType) Initializes the value for thecontextTypeattribute.defaultValue(Object defaultValue) Initializes the value for thedefaultValueattribute.expression(String expression) Initializes the value for theexpressionattribute.from(ModifiableVariable instance) Fill a builder with attribute values from the providedModifiableVariableinstance.Fill a builder with attribute values from the providedVariableinstance.Initializes the value for thenameattribute.Initializes the value for thepublishedattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedModifiableVariableinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedVariableinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
expression
Initializes the value for theexpressionattribute.- Parameters:
expression- The value for expression (can benull)- Returns:
thisbuilder for use in a chained invocation
-
defaultValue
Initializes the value for thedefaultValueattribute.- Parameters:
defaultValue- The value for defaultValue (can benull)- Returns:
thisbuilder for use in a chained invocation
-
context
Initializes the value for thecontextattribute.- Parameters:
context- The value for context (can benull)- Returns:
thisbuilder for use in a chained invocation
-
published
Initializes the value for thepublishedattribute.- Parameters:
published- The value for published (can benull)- Returns:
thisbuilder for use in a chained invocation
-
contextType
Initializes the value for thecontextTypeattribute.- Parameters:
contextType- The value for contextType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableVariable.- Returns:
- An immutable instance of Variable
- Throws:
IllegalStateException- if any required attributes are missing
-