Package io.substrait.function
Class ImmutableTypeExpression.ReturnProgram
java.lang.Object
io.substrait.function.TypeExpression.BaseTypeExpression
io.substrait.function.TypeExpression.ReturnProgram
io.substrait.function.ImmutableTypeExpression.ReturnProgram
- All Implemented Interfaces:
TypeExpression
- Enclosing class:
- ImmutableTypeExpression
public static final class ImmutableTypeExpression.ReturnProgram
extends TypeExpression.ReturnProgram
Immutable implementation of
TypeExpression.ReturnProgram.
Use the builder to create immutable instances:
ImmutableTypeExpression.ReturnProgram.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.substrait.function.TypeExpression.ReturnProgram
TypeExpression.ReturnProgram.AssignmentNested 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 forReturnProgram.copyOf(TypeExpression.ReturnProgram instance) Creates an immutable copy of aTypeExpression.ReturnProgramvalue.booleanThis instance is equal to all instances ofReturnProgramthat have equal attribute values.inthashCode()Computes a hash code from attributes:assignments,finalExpression.toString()Prints the immutable valueReturnProgramwith attribute values.withAssignments(TypeExpression.ReturnProgram.Assignment... elements) Copy the current immutable object with elements that replace the content ofassignments.withAssignments(Iterable<? extends TypeExpression.ReturnProgram.Assignment> elements) Copy the current immutable object with elements that replace the content ofassignments.Copy the current immutable object by setting a value for thefinalExpressionattribute.Methods inherited from class io.substrait.function.TypeExpression.BaseTypeExpression
accept
-
Method Details
-
assignments
- Specified by:
assignmentsin classTypeExpression.ReturnProgram- Returns:
- The value of the
assignmentsattribute
-
finalExpression
- Specified by:
finalExpressionin classTypeExpression.ReturnProgram- Returns:
- The value of the
finalExpressionattribute
-
withAssignments
public final ImmutableTypeExpression.ReturnProgram withAssignments(TypeExpression.ReturnProgram.Assignment... elements) Copy the current immutable object with elements that replace the content ofassignments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAssignments
public final ImmutableTypeExpression.ReturnProgram withAssignments(Iterable<? extends TypeExpression.ReturnProgram.Assignment> elements) Copy the current immutable object with elements that replace the content ofassignments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of assignments elements to set- Returns:
- A modified copy or
thisif not changed
-
withFinalExpression
Copy the current immutable object by setting a value for thefinalExpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for finalExpression- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofReturnProgramthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:assignments,finalExpression. -
toString
Prints the immutable valueReturnProgramwith attribute values. -
copyOf
Creates an immutable copy of aTypeExpression.ReturnProgramvalue. 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 ReturnProgram instance
-
builder
Creates a builder forReturnProgram.ImmutableTypeExpression.ReturnProgram.builder() .addAssignments|addAllAssignments(io.substrait.function.TypeExpression.ReturnProgram.Assignment) //assignmentselements .finalExpression(io.substrait.function.TypeExpression) // requiredfinalExpression.build();- Returns:
- A new ReturnProgram builder
-