Package io.substrait.function
Class ImmutableTypeExpression.Assignment
java.lang.Object
io.substrait.function.TypeExpression.ReturnProgram.Assignment
io.substrait.function.ImmutableTypeExpression.Assignment
- Enclosing class:
- ImmutableTypeExpression
public static final class ImmutableTypeExpression.Assignment
extends TypeExpression.ReturnProgram.Assignment
Immutable implementation of
TypeExpression.ReturnProgram.Assignment.
Use the builder to create immutable instances:
ImmutableTypeExpression.Assignment.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forAssignment.Creates an immutable copy of aTypeExpression.ReturnProgram.Assignmentvalue.booleanThis instance is equal to all instances ofAssignmentthat have equal attribute values.expr()inthashCode()Computes a hash code from attributes:name,expr.name()toString()Prints the immutable valueAssignmentwith attribute values.withExpr(TypeExpression value) Copy the current immutable object by setting a value for theexprattribute.Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
name
- Specified by:
namein classTypeExpression.ReturnProgram.Assignment- Returns:
- The value of the
nameattribute
-
expr
- Specified by:
exprin classTypeExpression.ReturnProgram.Assignment- Returns:
- The value of the
exprattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withExpr
Copy the current immutable object by setting a value for theexprattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expr- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofAssignmentthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,expr. -
toString
Prints the immutable valueAssignmentwith attribute values. -
copyOf
public static ImmutableTypeExpression.Assignment copyOf(TypeExpression.ReturnProgram.Assignment instance) Creates an immutable copy of aTypeExpression.ReturnProgram.Assignmentvalue. 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 Assignment instance
-
builder
Creates a builder forAssignment.ImmutableTypeExpression.Assignment.builder() .name(String) // requiredname.expr(io.substrait.function.TypeExpression) // requiredexpr.build();- Returns:
- A new Assignment builder
-