Package io.dialob.program.expr.arith
Class ImmutableConditionalListOperator.Builder<T>
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableConditionalListOperator.Builder<T>
-
- Enclosing class:
- ImmutableConditionalListOperator<T>
@NotThreadSafe public static final class ImmutableConditionalListOperator.Builder<T> extends Object
Builds instances of typeImmutableConditionalListOperator. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableConditionalListOperator.Builder<T>addAllItems(Iterable<? extends Pair<Expression,T>> elements)Adds elements toitemslist.ImmutableConditionalListOperator.Builder<T>addItems(Pair<Expression,T> element)Adds one element toitemslist.ImmutableConditionalListOperator.Builder<T>addItems(Pair<Expression,T>... elements)Adds elements toitemslist.ImmutableConditionalListOperator<T>build()Builds a newImmutableConditionalListOperator.ImmutableConditionalListOperator.Builder<T>from(ConditionalListOperator<T> instance)Fill a builder with attribute values from the providedConditionalListOperatorinstance.ImmutableConditionalListOperator.Builder<T>items(Iterable<? extends Pair<Expression,T>> elements)Sets or replaces all elements foritemslist.
-
-
-
Method Detail
-
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
public ImmutableConditionalListOperator<T> build()
Builds a newImmutableConditionalListOperator.- Returns:
- An immutable instance of ConditionalListOperator
- Throws:
IllegalStateException- if any required attributes are missing
-
-