Package io.dialob.executor.command
Class ImmutableGotoPage
- java.lang.Object
-
- io.dialob.executor.command.ImmutableGotoPage
-
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>,Command<ItemState>,GotoPage,ItemUpdateCommand,UpdateCommand<ItemId,ItemState>,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGotoPage extends Object implements GotoPage
Immutable implementation ofGotoPage.Use the builder to create immutable instances:
ImmutableGotoPage.builder(). Use the static factory method to create immutable instances:ImmutableGotoPage.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableGotoPage.BuilderBuilds instances of typeImmutableGotoPage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default booleananyErrors(EvalContext context)static ImmutableGotoPage.Builderbuilder()Creates a builder forImmutableGotoPage.static ImmutableGotoPagecopyOf(GotoPage instance)Creates an immutable copy of aGotoPagevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableGotoPagethat have equal attribute values.ItemIdgetPage()ItemIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ItemState>>getTriggers()default ItemStategotoPage(EvalContext context, ItemState itemState, ItemId page)inthashCode()Computes a hash code from attributes:triggers,targetId,page.static ImmutableGotoPageof(ItemId page, Iterable<? extends Trigger<ItemState>> triggers)Construct a new immutableGotoPageinstance.static ImmutableGotoPageof(ItemId page, List<Trigger<ItemState>> triggers)Construct a new immutableGotoPageinstance.default booleanpageIsInactive(EvalContext context, ItemId page)StringtoString()Prints the immutable valueGotoPagewith attribute values.ImmutableGotoPagewithPage(ItemId value)Copy the current immutable object by setting a value for thepageattribute.ImmutableGotoPagewithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableGotoPagewithTriggers(Trigger<ItemState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableGotoPagewithTriggers(Iterable<? extends Trigger<ItemState>> elements)Copy the current immutable object with elements that replace the content oftriggers.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.executor.command.Command
getEventMatchers
-
-
-
-
Method Detail
-
getTriggers
public com.google.common.collect.ImmutableList<Trigger<ItemState>> getTriggers()
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
public ItemId getTargetId()
- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Returns:
- The value of the
targetIdattribute
-
getPage
public ItemId getPage()
-
withTriggers
@SafeVarargs public final ImmutableGotoPage withTriggers(Trigger<ItemState>... elements)
Copy the current immutable object with elements that replace the content oftriggers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTriggers
public final ImmutableGotoPage withTriggers(Iterable<? extends Trigger<ItemState>> elements)
Copy the current immutable object with elements that replace the content oftriggers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of triggers elements to set- Returns:
- A modified copy of
thisobject
-
withTargetId
public final ImmutableGotoPage withTargetId(ItemId value)
Copy the current immutable object by setting a value for thetargetIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Parameters:
value- A new value for targetId- Returns:
- A modified copy of the
thisobject
-
withPage
public final ImmutableGotoPage withPage(ItemId value)
Copy the current immutable object by setting a value for thepageattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for page- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableGotoPagethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId,page.
-
toString
public String toString()
Prints the immutable valueGotoPagewith attribute values.
-
of
public static ImmutableGotoPage of(ItemId page, List<Trigger<ItemState>> triggers)
Construct a new immutableGotoPageinstance.- Parameters:
page- The value for thepageattributetriggers- The value for thetriggersattribute- Returns:
- An immutable GotoPage instance
-
of
public static ImmutableGotoPage of(ItemId page, Iterable<? extends Trigger<ItemState>> triggers)
Construct a new immutableGotoPageinstance.- Parameters:
page- The value for thepageattributetriggers- The value for thetriggersattribute- Returns:
- An immutable GotoPage instance
-
copyOf
public static ImmutableGotoPage copyOf(GotoPage instance)
Creates an immutable copy of aGotoPagevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable GotoPage instance
-
builder
public static ImmutableGotoPage.Builder builder()
Creates a builder forImmutableGotoPage.ImmutableGotoPage.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ItemState>) //triggerselements .targetId(io.dialob.executor.model.ItemId) // optionaltargetId.page(io.dialob.executor.model.ItemId) // requiredpage.build();- Returns:
- A new ImmutableGotoPage builder
-
pageIsInactive
public default boolean pageIsInactive(EvalContext context, ItemId page)
-
anyErrors
public default boolean anyErrors(EvalContext context)
-
gotoPage
public default ItemState gotoPage(EvalContext context, ItemState itemState, ItemId page)
-
-