Package io.substrait.function
Class ImmutableTypeExpression.BinaryOperation
java.lang.Object
io.substrait.function.TypeExpression.BaseTypeExpression
io.substrait.function.TypeExpression.BinaryOperation
io.substrait.function.ImmutableTypeExpression.BinaryOperation
- All Implemented Interfaces:
TypeExpression
- Enclosing class:
- ImmutableTypeExpression
public static final class ImmutableTypeExpression.BinaryOperation
extends TypeExpression.BinaryOperation
Immutable implementation of
TypeExpression.BinaryOperation.
Use the builder to create immutable instances:
ImmutableTypeExpression.BinaryOperation.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.substrait.function.TypeExpression.BinaryOperation
TypeExpression.BinaryOperation.OpTypeNested 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 forBinaryOperation.copyOf(TypeExpression.BinaryOperation instance) Creates an immutable copy of aTypeExpression.BinaryOperationvalue.booleanThis instance is equal to all instances ofBinaryOperationthat have equal attribute values.inthashCode()Computes a hash code from attributes:opType,left,right.left()opType()right()toString()Prints the immutable valueBinaryOperationwith attribute values.withLeft(TypeExpression value) Copy the current immutable object by setting a value for theleftattribute.Copy the current immutable object by setting a value for theopTypeattribute.withRight(TypeExpression value) Copy the current immutable object by setting a value for therightattribute.Methods inherited from class io.substrait.function.TypeExpression.BaseTypeExpression
accept
-
Method Details
-
opType
- Specified by:
opTypein classTypeExpression.BinaryOperation- Returns:
- The value of the
opTypeattribute
-
left
- Specified by:
leftin classTypeExpression.BinaryOperation- Returns:
- The value of the
leftattribute
-
right
- Specified by:
rightin classTypeExpression.BinaryOperation- Returns:
- The value of the
rightattribute
-
withOpType
public final ImmutableTypeExpression.BinaryOperation withOpType(TypeExpression.BinaryOperation.OpType value) Copy the current immutable object by setting a value for theopTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for opType- Returns:
- A modified copy or the
thisobject
-
withLeft
Copy the current immutable object by setting a value for theleftattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for left- Returns:
- A modified copy or the
thisobject
-
withRight
Copy the current immutable object by setting a value for therightattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for right- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofBinaryOperationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:opType,left,right. -
toString
Prints the immutable valueBinaryOperationwith attribute values. -
copyOf
public static ImmutableTypeExpression.BinaryOperation copyOf(TypeExpression.BinaryOperation instance) Creates an immutable copy of aTypeExpression.BinaryOperationvalue. 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 BinaryOperation instance
-
builder
Creates a builder forBinaryOperation.ImmutableTypeExpression.BinaryOperation.builder() .opType(io.substrait.function.TypeExpression.BinaryOperation.OpType) // requiredopType.left(io.substrait.function.TypeExpression) // requiredleft.right(io.substrait.function.TypeExpression) // requiredright.build();- Returns:
- A new BinaryOperation builder
-