Package io.substrait.expression
Class ImmutableExpression.SwitchClause
java.lang.Object
io.substrait.expression.Expression.SwitchClause
io.substrait.expression.ImmutableExpression.SwitchClause
- Enclosing class:
- ImmutableExpression
Immutable implementation of
Expression.SwitchClause.
Use the builder to create immutable instances:
ImmutableExpression.SwitchClause.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSwitchClause.copyOf(Expression.SwitchClause instance) Creates an immutable copy of aExpression.SwitchClausevalue.booleanThis instance is equal to all instances ofSwitchClausethat have equal attribute values.inthashCode()Computes a hash code from attributes:condition,then.then()toString()Prints the immutable valueSwitchClausewith attribute values.withCondition(Expression.Literal value) Copy the current immutable object by setting a value for theconditionattribute.withThen(Expression value) Copy the current immutable object by setting a value for thethenattribute.
-
Method Details
-
condition
- Specified by:
conditionin classExpression.SwitchClause- Returns:
- The value of the
conditionattribute
-
then
- Specified by:
thenin classExpression.SwitchClause- Returns:
- The value of the
thenattribute
-
withCondition
Copy the current immutable object by setting a value for theconditionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for condition- Returns:
- A modified copy or the
thisobject
-
withThen
Copy the current immutable object by setting a value for thethenattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for then- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofSwitchClausethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:condition,then. -
toString
Prints the immutable valueSwitchClausewith attribute values. -
copyOf
Creates an immutable copy of aExpression.SwitchClausevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SwitchClause instance
-
builder
Creates a builder forSwitchClause.ImmutableExpression.SwitchClause.builder() .condition(io.substrait.expression.Expression.Literal) // requiredcondition.then(io.substrait.expression.Expression) // requiredthen.build();- Returns:
- A new SwitchClause builder
-