Class ImmutableConditionalListOperator.Builder<T>
java.lang.Object
io.dialob.session.engine.program.expr.arith.ImmutableConditionalListOperator.Builder<T>
- Enclosing class:
ImmutableConditionalListOperator<T>
@Generated(from="ConditionalListOperator",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableConditionalListOperator.Builder<T>
extends Object
Builds instances of type
ImmutableConditionalListOperator.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllItems(Iterable<? extends Pair<Expression, T>> elements) Adds elements toitemslist.addItems(Pair<Expression, T> element) Adds one element toitemslist.addItems(Pair<Expression, T>... elements) Adds elements toitemslist.build()Builds a newImmutableConditionalListOperator.from(ConditionalListOperator<T> instance) Fill a builder with attribute values from the providedConditionalListOperatorinstance.items(Iterable<? extends Pair<Expression, T>> elements) Sets or replaces all elements foritemslist.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableConditionalListOperator.Builder<T> from(ConditionalListOperator<T> instance) Fill a builder with attribute values from the providedConditionalListOperatorinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addItems
@CanIgnoreReturnValue public final ImmutableConditionalListOperator.Builder<T> addItems(Pair<Expression, T> element) Adds one element toitemslist.- Parameters:
element- A items element- Returns:
thisbuilder for use in a chained invocation
-
addItems
@CanIgnoreReturnValue @SafeVarargs public final ImmutableConditionalListOperator.Builder<T> addItems(Pair<Expression, T>... elements) Adds elements toitemslist.- Parameters:
elements- An array of items elements- Returns:
thisbuilder for use in a chained invocation
-
items
@CanIgnoreReturnValue public final ImmutableConditionalListOperator.Builder<T> items(Iterable<? extends Pair<Expression, T>> elements) Sets or replaces all elements foritemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisbuilder for use in a chained invocation
-
addAllItems
@CanIgnoreReturnValue public final ImmutableConditionalListOperator.Builder<T> addAllItems(Iterable<? extends Pair<Expression, T>> elements) Adds elements toitemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableConditionalListOperator.- Returns:
- An immutable instance of ConditionalListOperator
- Throws:
IllegalStateException- if any required attributes are missing
-