Package io.substrait.expression
Class ImmutableExpression.SwitchClause.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.SwitchClause.Builder
- Enclosing class:
- ImmutableExpression.SwitchClause
Builds instances of type
SwitchClause.
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 newSwitchClause.condition(Expression.Literal condition) Initializes the value for theconditionattribute.from(Expression.SwitchClause instance) Fill a builder with attribute values from the providedSwitchClauseinstance.then(Expression then) Initializes the value for thethenattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedSwitchClauseinstance. 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
-
condition
Initializes the value for theconditionattribute.- Parameters:
condition- The value for condition- Returns:
thisbuilder for use in a chained invocation
-
then
Initializes the value for thethenattribute.- Parameters:
then- The value for then- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSwitchClause.- Returns:
- An immutable instance of SwitchClause
- Throws:
IllegalStateException- if any required attributes are missing
-