Package io.substrait.function
Class ImmutableTypeExpression.IfOperation
java.lang.Object
io.substrait.function.TypeExpression.BaseTypeExpression
io.substrait.function.TypeExpression.IfOperation
io.substrait.function.ImmutableTypeExpression.IfOperation
- All Implemented Interfaces:
TypeExpression
- Enclosing class:
- ImmutableTypeExpression
Immutable implementation of
TypeExpression.IfOperation.
Use the builder to create immutable instances:
ImmutableTypeExpression.IfOperation.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.function.TypeExpression
TypeExpression.BaseTypeExpression, TypeExpression.BinaryOperation, TypeExpression.Decimal, TypeExpression.FixedBinary, TypeExpression.FixedChar, TypeExpression.Func, TypeExpression.IfOperation, TypeExpression.IntegerLiteral, TypeExpression.IntervalCompound, TypeExpression.IntervalDay, TypeExpression.ListType, TypeExpression.Map, TypeExpression.NotOperation, TypeExpression.PrecisionTime, TypeExpression.PrecisionTimestamp, TypeExpression.PrecisionTimestampTZ, TypeExpression.RequiredTypeExpressionVisitorException, TypeExpression.ReturnProgram, TypeExpression.Struct, TypeExpression.VarChar -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forIfOperation.copyOf(TypeExpression.IfOperation instance) Creates an immutable copy of aTypeExpression.IfOperationvalue.elseExpr()booleanThis instance is equal to all instances ofIfOperationthat have equal attribute values.inthashCode()Computes a hash code from attributes:ifCondition,thenExpr,elseExpr.thenExpr()toString()Prints the immutable valueIfOperationwith attribute values.withElseExpr(TypeExpression value) Copy the current immutable object by setting a value for theelseExprattribute.withIfCondition(TypeExpression value) Copy the current immutable object by setting a value for theifConditionattribute.withThenExpr(TypeExpression value) Copy the current immutable object by setting a value for thethenExprattribute.Methods inherited from class io.substrait.function.TypeExpression.BaseTypeExpression
accept
-
Method Details
-
ifCondition
- Specified by:
ifConditionin classTypeExpression.IfOperation- Returns:
- The value of the
ifConditionattribute
-
thenExpr
- Specified by:
thenExprin classTypeExpression.IfOperation- Returns:
- The value of the
thenExprattribute
-
elseExpr
- Specified by:
elseExprin classTypeExpression.IfOperation- Returns:
- The value of the
elseExprattribute
-
withIfCondition
Copy the current immutable object by setting a value for theifConditionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ifCondition- Returns:
- A modified copy or the
thisobject
-
withThenExpr
Copy the current immutable object by setting a value for thethenExprattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for thenExpr- Returns:
- A modified copy or the
thisobject
-
withElseExpr
Copy the current immutable object by setting a value for theelseExprattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elseExpr- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofIfOperationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ifCondition,thenExpr,elseExpr. -
toString
Prints the immutable valueIfOperationwith attribute values. -
copyOf
Creates an immutable copy of aTypeExpression.IfOperationvalue. 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 IfOperation instance
-
builder
Creates a builder forIfOperation.ImmutableTypeExpression.IfOperation.builder() .ifCondition(io.substrait.function.TypeExpression) // requiredifCondition.thenExpr(io.substrait.function.TypeExpression) // requiredthenExpr.elseExpr(io.substrait.function.TypeExpression) // requiredelseExpr.build();- Returns:
- A new IfOperation builder
-