Package io.substrait.expression
Class ImmutableExpression.IfClause
java.lang.Object
io.substrait.expression.Expression.IfClause
io.substrait.expression.ImmutableExpression.IfClause
- Enclosing class:
- ImmutableExpression
Immutable implementation of
Expression.IfClause.
Use the builder to create immutable instances:
ImmutableExpression.IfClause.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forIfClause.static ImmutableExpression.IfClausecopyOf(Expression.IfClause instance) Creates an immutable copy of aExpression.IfClausevalue.booleanThis instance is equal to all instances ofIfClausethat have equal attribute values.inthashCode()Computes a hash code from attributes:condition,then.then()toString()Prints the immutable valueIfClausewith attribute values.withCondition(Expression 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.IfClause- Returns:
- The value of the
conditionattribute
-
then
- Specified by:
thenin classExpression.IfClause- 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 ofIfClausethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:condition,then. -
toString
Prints the immutable valueIfClausewith attribute values. -
copyOf
Creates an immutable copy of aExpression.IfClausevalue. 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 IfClause instance
-
builder
Creates a builder forIfClause.ImmutableExpression.IfClause.builder() .condition(io.substrait.expression.Expression) // requiredcondition.then(io.substrait.expression.Expression) // requiredthen.build();- Returns:
- A new IfClause builder
-