Package io.substrait.expression
Class ImmutableExpression.SortField
java.lang.Object
io.substrait.expression.Expression.SortField
io.substrait.expression.ImmutableExpression.SortField
- Enclosing class:
- ImmutableExpression
Immutable implementation of
Expression.SortField.
Use the builder to create immutable instances:
ImmutableExpression.SortField.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSortField.copyOf(Expression.SortField instance) Creates an immutable copy of aExpression.SortFieldvalue.booleanThis instance is equal to all instances ofSortFieldthat have equal attribute values.expr()inthashCode()Computes a hash code from attributes:expr,direction.toString()Prints the immutable valueSortFieldwith attribute values.Copy the current immutable object by setting a value for thedirectionattribute.withExpr(Expression value) Copy the current immutable object by setting a value for theexprattribute.
-
Method Details
-
expr
- Specified by:
exprin classExpression.SortField- Returns:
- The value of the
exprattribute
-
direction
- Specified by:
directionin classExpression.SortField- Returns:
- The value of the
directionattribute
-
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
-
withDirection
Copy the current immutable object by setting a value for thedirectionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for direction- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofSortFieldthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:expr,direction. -
toString
Prints the immutable valueSortFieldwith attribute values. -
copyOf
Creates an immutable copy of aExpression.SortFieldvalue. 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 SortField instance
-
builder
Creates a builder forSortField.ImmutableExpression.SortField.builder() .expr(io.substrait.expression.Expression) // requiredexpr.direction(io.substrait.expression.Expression.SortDirection) // requireddirection.build();- Returns:
- A new SortField builder
-