Package io.dialob.program.expr.arith
Class ImmutableConditionalListOperator<T>
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableConditionalListOperator<T>
-
- All Implemented Interfaces:
ConditionalListOperator<T>,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableConditionalListOperator<T> extends Object implements ConditionalListOperator<T>
Immutable implementation ofConditionalListOperator.Use the builder to create immutable instances:
ImmutableConditionalListOperator.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableConditionalListOperator.Builder<T>Builds instances of typeImmutableConditionalListOperator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ImmutableConditionalListOperator.Builder<T>builder()Creates a builder forImmutableConditionalListOperator.static <T> ImmutableConditionalListOperator<T>copyOf(ConditionalListOperator<T> instance)Creates an immutable copy of aConditionalListOperatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableConditionalListOperatorthat have equal attribute values.com.google.common.collect.ImmutableList<Pair<Expression,T>>getItems()inthashCode()Computes a hash code from attributes:items.StringtoString()Prints the immutable valueConditionalListOperatorwith attribute values.ImmutableConditionalListOperator<T>withItems(Pair<Expression,T>... elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableConditionalListOperator<T>withItems(Iterable<? extends Pair<Expression,T>> elements)Copy the current immutable object with elements that replace the content ofitems.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.expr.arith.ConditionalListOperator
eval, getEvalRequiredConditions, getValueType
-
-
-
-
Method Detail
-
getItems
public com.google.common.collect.ImmutableList<Pair<Expression,T>> getItems()
- Specified by:
getItemsin interfaceConditionalListOperator<T>- Returns:
- The value of the
itemsattribute
-
withItems
@SafeVarargs public final ImmutableConditionalListOperator<T> withItems(Pair<Expression,T>... elements)
Copy the current immutable object with elements that replace the content ofitems.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withItems
public final ImmutableConditionalListOperator<T> withItems(Iterable<? extends Pair<Expression,T>> elements)
Copy the current immutable object with elements that replace the content ofitems. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of items elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableConditionalListOperatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:items.
-
toString
public String toString()
Prints the immutable valueConditionalListOperatorwith attribute values.
-
copyOf
public static <T> ImmutableConditionalListOperator<T> copyOf(ConditionalListOperator<T> instance)
Creates an immutable copy of aConditionalListOperatorvalue. 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 ConditionalListOperator instance
-
builder
public static <T> ImmutableConditionalListOperator.Builder<T> builder()
Creates a builder forImmutableConditionalListOperator.ImmutableConditionalListOperator.<T>builder() .addItems|addAllItems(io.dialob.program.expr.arith.Pair<io.dialob.program.model.Expression, T>) //itemselements .build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableConditionalListOperator builder
-
-