Class ImmutableBinaryOperator<T>
java.lang.Object
io.dialob.session.engine.program.expr.arith.ImmutableBinaryOperator<T>
- All Implemented Interfaces:
BinaryOperator<T>,Expression,Serializable
@Generated(from="BinaryOperator",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableBinaryOperator<T>
extends Object
implements BinaryOperator<T>
Immutable implementation of
BinaryOperator.
Use the builder to create immutable instances:
ImmutableBinaryOperator.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableBinaryOperator. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ImmutableBinaryOperator.Builder<T> builder()Creates a builder forImmutableBinaryOperator.static <T> ImmutableBinaryOperator<T> copyOf(BinaryOperator<T> instance) Creates an immutable copy of aBinaryOperatorvalue.booleanThis instance is equal to all instances ofImmutableBinaryOperatorthat have equal attribute values.com.google.common.collect.ImmutableList<Expression> getNodes()inthashCode()Computes a hash code from attributes:nodes,reducer.toString()Prints the immutable valueBinaryOperatorwith attribute values.final ImmutableBinaryOperator<T> withNodes(Expression... elements) Copy the current immutable object with elements that replace the content ofnodes.final ImmutableBinaryOperator<T> withNodes(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofnodes.final ImmutableBinaryOperator<T> withReducer(Reducer<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.BinaryOperator
eval, getEvalRequiredConditions, getValueType
-
Method Details
-
getNodes
- Specified by:
getNodesin interfaceBinaryOperator<T>- Returns:
- The value of the
nodesattribute
-
getReducer
- Specified by:
getReducerin interfaceBinaryOperator<T>- Returns:
- The value of the
reducerattribute
-
withNodes
Copy the current immutable object with elements that replace the content ofnodes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNodes
Copy the current immutable object with elements that replace the content ofnodes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of nodes elements to set- Returns:
- A modified copy or
thisif not changed
-
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
-
equals
This instance is equal to all instances ofImmutableBinaryOperatorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nodes,reducer. -
toString
Prints the immutable valueBinaryOperatorwith attribute values. -
copyOf
Creates an immutable copy of aBinaryOperatorvalue. 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 BinaryOperator instance
-
builder
Creates a builder forImmutableBinaryOperator.ImmutableBinaryOperator.<T>builder() .addNodes|addAllNodes(io.dialob.session.engine.program.model.Expression) //nodeselements .reducer(io.dialob.session.engine.program.expr.arith.Reducer<T>) // requiredreducer.build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableBinaryOperator builder
-