Package io.substrait.extendedexpression
Class ImmutableAggregateFunctionReference
java.lang.Object
io.substrait.extendedexpression.ExtendedExpression.AggregateFunctionReference
io.substrait.extendedexpression.ImmutableAggregateFunctionReference
- All Implemented Interfaces:
ExtendedExpression.ExpressionReferenceBase
public final class ImmutableAggregateFunctionReference
extends ExtendedExpression.AggregateFunctionReference
Immutable implementation of
ExtendedExpression.AggregateFunctionReference.
Use the builder to create immutable instances:
ImmutableAggregateFunctionReference.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAggregateFunctionReference. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableAggregateFunctionReference.Creates an immutable copy of aExtendedExpression.AggregateFunctionReferencevalue.booleanThis instance is equal to all instances ofImmutableAggregateFunctionReferencethat have equal attribute values.Returns the referenced aggregate measure.Returns the output names associated with this reference.inthashCode()Computes a hash code from attributes:outputNames,measure.toString()Prints the immutable valueAggregateFunctionReferencewith attribute values.withMeasure(Aggregate.Measure value) Copy the current immutable object by setting a value for themeasureattribute.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
-
getMeasure
Returns the referenced aggregate measure.- Specified by:
getMeasurein classExtendedExpression.AggregateFunctionReference- Returns:
- the measure
-
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
-
withMeasure
Copy the current immutable object by setting a value for themeasureattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for measure- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableAggregateFunctionReferencethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:outputNames,measure. -
toString
Prints the immutable valueAggregateFunctionReferencewith attribute values. -
copyOf
public static ImmutableAggregateFunctionReference copyOf(ExtendedExpression.AggregateFunctionReference instance) Creates an immutable copy of aExtendedExpression.AggregateFunctionReferencevalue. 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 AggregateFunctionReference instance
-
builder
Creates a builder forImmutableAggregateFunctionReference.ImmutableAggregateFunctionReference.builder() .addOutputNames|addAllOutputNames(String) //outputNameselements .measure(io.substrait.relation.Aggregate.Measure) // requiredmeasure.build();- Returns:
- A new ImmutableAggregateFunctionReference builder
-