Package io.substrait.extendedexpression
Class ImmutableExpressionReference
java.lang.Object
io.substrait.extendedexpression.ExtendedExpression.ExpressionReference
io.substrait.extendedexpression.ImmutableExpressionReference
- All Implemented Interfaces:
ExtendedExpression.ExpressionReferenceBase
Immutable implementation of
ExtendedExpression.ExpressionReference.
Use the builder to create immutable instances:
ImmutableExpressionReference.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExpressionReference. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExpressionReference.static ImmutableExpressionReferencecopyOf(ExtendedExpression.ExpressionReference instance) Creates an immutable copy of aExtendedExpression.ExpressionReferencevalue.booleanThis instance is equal to all instances ofImmutableExpressionReferencethat have equal attribute values.Returns the referenced expression.Returns the output names associated with this reference.inthashCode()Computes a hash code from attributes:outputNames,expression.toString()Prints the immutable valueExpressionReferencewith attribute values.withExpression(Expression value) Copy the current immutable object by setting a value for theexpressionattribute.withOutputNames(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofoutputNames.withOutputNames(String... elements) Copy the current immutable object with elements that replace the content ofoutputNames.
-
Method Details
-
getOutputNames
Returns the output names associated with this reference.- Returns:
- list of output names
-
getExpression
Returns the referenced expression.- Specified by:
getExpressionin classExtendedExpression.ExpressionReference- Returns:
- the expression
-
withOutputNames
Copy the current immutable object with elements that replace the content ofoutputNames.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOutputNames
Copy the current immutable object with elements that replace the content ofoutputNames. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of outputNames elements to set- Returns:
- A modified copy or
thisif not changed
-
withExpression
Copy the current immutable object by setting a value for theexpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expression- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableExpressionReferencethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:outputNames,expression. -
toString
Prints the immutable valueExpressionReferencewith attribute values. -
copyOf
Creates an immutable copy of aExtendedExpression.ExpressionReferencevalue. 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 ExpressionReference instance
-
builder
Creates a builder forImmutableExpressionReference.ImmutableExpressionReference.builder() .addOutputNames|addAllOutputNames(String) //outputNameselements .expression(io.substrait.expression.Expression) // requiredexpression.build();- Returns:
- A new ImmutableExpressionReference builder
-