Package io.dialob.executor.command
Class ImmutableUpdateDisabledCommand.Builder
- java.lang.Object
-
- io.dialob.executor.command.ImmutableUpdateDisabledCommand.Builder
-
- Enclosing class:
- ImmutableUpdateDisabledCommand
@NotThreadSafe public static final class ImmutableUpdateDisabledCommand.Builder extends Object
Builds instances of typeImmutableUpdateDisabledCommand. 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 ImmutableUpdateDisabledCommand.Builder from(UpdateDisabledCommand instance)
Fill a builder with attribute values from the providedUpdateDisabledCommandinstance. 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 ImmutableUpdateDisabledCommand.Builder addTriggers(Trigger<ItemState> element)
Adds one element totriggerslist.- Parameters:
element- A triggers element- Returns:
thisbuilder for use in a chained invocation
-
addTriggers
@CanIgnoreReturnValue @SafeVarargs public final ImmutableUpdateDisabledCommand.Builder addTriggers(Trigger<ItemState>... elements)
Adds elements totriggerslist.- Parameters:
elements- An array of triggers elements- Returns:
thisbuilder for use in a chained invocation
-
triggers
@CanIgnoreReturnValue public final ImmutableUpdateDisabledCommand.Builder triggers(Iterable<? extends Trigger<ItemState>> 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 ImmutableUpdateDisabledCommand.Builder addAllTriggers(Iterable<? extends Trigger<ItemState>> elements)
Adds elements totriggerslist.- Parameters:
elements- An iterable of triggers elements- Returns:
thisbuilder for use in a chained invocation
-
targetId
@CanIgnoreReturnValue public final ImmutableUpdateDisabledCommand.Builder targetId(ItemId targetId)
Initializes the value for thetargetIdattribute.- Parameters:
targetId- The value for targetId- Returns:
thisbuilder for use in a chained invocation
-
expression
@CanIgnoreReturnValue public final ImmutableUpdateDisabledCommand.Builder expression(Expression expression)
Initializes the value for theexpressionattribute.- Parameters:
expression- The value for expression- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableUpdateDisabledCommand build()
Builds a newImmutableUpdateDisabledCommand.- Returns:
- An immutable instance of UpdateDisabledCommand
- Throws:
IllegalStateException- if any required attributes are missing
-
-