Package io.dialob.executor.command
Class ImmutableUpdateValueSetCommand.Builder
- java.lang.Object
-
- io.dialob.executor.command.ImmutableUpdateValueSetCommand.Builder
-
- Enclosing class:
- ImmutableUpdateValueSetCommand
@NotThreadSafe public static final class ImmutableUpdateValueSetCommand.Builder extends Object
Builds instances of typeImmutableUpdateValueSetCommand. 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
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder from(UpdateValueSetCommand instance)
Fill a builder with attribute values from the providedUpdateValueSetCommandinstance. 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
-
addTriggers
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder addTriggers(Trigger<ValueSetState> element)
Adds one element totriggerslist.- Parameters:
element- A triggers element- Returns:
thisbuilder for use in a chained invocation
-
addTriggers
@CanIgnoreReturnValue @SafeVarargs public final ImmutableUpdateValueSetCommand.Builder addTriggers(Trigger<ValueSetState>... elements)
Adds elements totriggerslist.- Parameters:
elements- An array of triggers elements- Returns:
thisbuilder for use in a chained invocation
-
triggers
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder triggers(Iterable<? extends Trigger<ValueSetState>> elements)
Sets or replaces all elements fortriggerslist.- Parameters:
elements- An iterable of triggers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTriggers
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder addAllTriggers(Iterable<? extends Trigger<ValueSetState>> elements)
Adds elements totriggerslist.- Parameters:
elements- An iterable of triggers elements- Returns:
thisbuilder for use in a chained invocation
-
targetId
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder targetId(ValueSetId targetId)
Initializes the value for thetargetIdattribute.- Parameters:
targetId- The value for targetId- Returns:
thisbuilder for use in a chained invocation
-
addEntries
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder addEntries(Value<ValueSet.Entry> element)
Adds one element toentrieslist.- Parameters:
element- A entries element- Returns:
thisbuilder for use in a chained invocation
-
addEntries
@CanIgnoreReturnValue @SafeVarargs public final ImmutableUpdateValueSetCommand.Builder addEntries(Value<ValueSet.Entry>... elements)
Adds elements toentrieslist.- Parameters:
elements- An array of entries elements- Returns:
thisbuilder for use in a chained invocation
-
entries
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder entries(Iterable<? extends Value<ValueSet.Entry>> elements)
Sets or replaces all elements forentrieslist.- Parameters:
elements- An iterable of entries elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEntries
@CanIgnoreReturnValue public final ImmutableUpdateValueSetCommand.Builder addAllEntries(Iterable<? extends Value<ValueSet.Entry>> elements)
Adds elements toentrieslist.- Parameters:
elements- An iterable of entries elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableUpdateValueSetCommand build()
Builds a newImmutableUpdateValueSetCommand.- Returns:
- An immutable instance of UpdateValueSetCommand
- Throws:
IllegalStateException- if any required attributes are missing
-
-