Class ImmutableArrayReducerOperator<T>
java.lang.Object
io.dialob.session.engine.program.expr.arith.ImmutableArrayReducerOperator<T>
- All Implemented Interfaces:
ArrayReducerOperator<T>,Expression,Serializable
@Generated(from="ArrayReducerOperator",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableArrayReducerOperator<T>
extends Object
implements ArrayReducerOperator<T>
Immutable implementation of
ArrayReducerOperator.
Use the builder to create immutable instances:
ImmutableArrayReducerOperator.builder().
Use the static factory method to create immutable instances:
ImmutableArrayReducerOperator.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableArrayReducerOperator. -
Field Summary
Fields inherited from interface io.dialob.session.engine.program.expr.arith.ArrayReducerOperator
ALL, ANSWER_COUNT, ANY, DECIMAL_MAX, DECIMAL_MIN, DECIMAL_SUM, INTEGER_MAX, INTEGER_MIN, INTEGER_SUM -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ImmutableArrayReducerOperator.Builder<T> builder()Creates a builder forImmutableArrayReducerOperator.static <T> ImmutableArrayReducerOperator<T> copyOf(ArrayReducerOperator<T> instance) Creates an immutable copy of aArrayReducerOperatorvalue.booleanThis instance is equal to all instances ofImmutableArrayReducerOperatorthat have equal attribute values.inthashCode()Computes a hash code from attributes:reducer,arrayExpression,placeholderValue.static <T> ImmutableArrayReducerOperator<T> of(BinaryOperator<T> reducer, Expression arrayExpression) Construct a new immutableArrayReducerOperatorinstance.toString()Prints the immutable valueArrayReducerOperatorwith attribute values.final ImmutableArrayReducerOperator<T> withArrayExpression(Expression value) Copy the current immutable object by setting a value for thearrayExpressionattribute.final ImmutableArrayReducerOperator<T> withPlaceholderValue(Object value) Copy the current immutable object by setting a value for theplaceholderValueattribute.final ImmutableArrayReducerOperator<T> withReducer(BinaryOperator<T> value) Copy the current immutable object by setting a value for thereducerattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.dialob.session.engine.program.expr.arith.ArrayReducerOperator
eval, getEvalRequiredConditions, getValueType
-
Method Details
-
getReducer
- Specified by:
getReducerin interfaceArrayReducerOperator<T>- Returns:
- The value of the
reducerattribute
-
getArrayExpression
- Specified by:
getArrayExpressionin interfaceArrayReducerOperator<T>- Returns:
- The value of the
arrayExpressionattribute
-
getPlaceholderValue
- Specified by:
getPlaceholderValuein interfaceArrayReducerOperator<T>- Returns:
- The value of the
placeholderValueattribute
-
withReducer
Copy the current immutable object by setting a value for thereducerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reducer- Returns:
- A modified copy or the
thisobject
-
withArrayExpression
Copy the current immutable object by setting a value for thearrayExpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for arrayExpression- Returns:
- A modified copy or the
thisobject
-
withPlaceholderValue
Copy the current immutable object by setting a value for theplaceholderValueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for placeholderValue (can benull)- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableArrayReducerOperatorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:reducer,arrayExpression,placeholderValue. -
toString
Prints the immutable valueArrayReducerOperatorwith attribute values. -
of
public static <T> ImmutableArrayReducerOperator<T> of(BinaryOperator<T> reducer, Expression arrayExpression) Construct a new immutableArrayReducerOperatorinstance.- Type Parameters:
T- generic parameter T- Parameters:
reducer- The value for thereducerattributearrayExpression- The value for thearrayExpressionattribute- Returns:
- An immutable ArrayReducerOperator instance
-
copyOf
Creates an immutable copy of aArrayReducerOperatorvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ArrayReducerOperator instance
-
builder
Creates a builder forImmutableArrayReducerOperator.ImmutableArrayReducerOperator.<T>builder() .reducer(function.BinaryOperator<T>) // requiredreducer.arrayExpression(io.dialob.session.engine.program.model.Expression) // requiredarrayExpression.placeholderValue(Object | null) // nullableplaceholderValue.build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableArrayReducerOperator builder
-