Class ImmutableNextPage
java.lang.Object
io.dialob.session.engine.session.command.ImmutableNextPage
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,,ItemState> Command<ItemState>,ItemUpdateCommand,NextPage,UpdateCommand<ItemId,,ItemState> Serializable
@Generated(from="NextPage",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableNextPage
extends Object
implements NextPage
Immutable implementation of
NextPage.
Use the builder to create immutable instances:
ImmutableNextPage.builder().
Use the static factory method to create immutable instances:
ImmutableNextPage.of().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleananyErrors(EvalContext context) static ImmutableNextPage.Builderbuilder()Creates a builder forImmutableNextPage.static ImmutableNextPageCreates an immutable copy of aNextPagevalue.booleanThis instance is equal to all instances ofImmutableNextPagethat have equal attribute values.default ItemStategotoPage(EvalContext context, ItemState itemState, ItemId page) inthashCode()Computes a hash code from attributes:triggers,targetId.static ImmutableNextPageConstruct a new immutableNextPageinstance.static ImmutableNextPageConstruct a new immutableNextPageinstance.default booleanpageIsInactive(EvalContext context, ItemId page) toString()Prints the immutable valueNextPagewith attribute values.final ImmutableNextPagewithTargetId(ItemId value) Copy the current immutable object by setting a value for thetargetIdattribute.final ImmutableNextPagewithTriggers(Trigger<ItemState>... elements) Copy the current immutable object with elements that replace the content oftriggers.final ImmutableNextPagewithTriggers(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, waitMethods inherited from interface io.dialob.session.engine.session.command.Command
getEventMatchers
-
Method Details
-
getTriggers
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState> - Returns:
- The value of the
targetIdattribute
-
withTriggers
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
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 or
thisif not changed
-
withTargetId
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 or the
thisobject
-
equals
This instance is equal to all instances ofImmutableNextPagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:triggers,targetId. -
toString
Prints the immutable valueNextPagewith attribute values. -
of
Construct a new immutableNextPageinstance.- Parameters:
triggers- The value for thetriggersattribute- Returns:
- An immutable NextPage instance
-
of
Construct a new immutableNextPageinstance.- Parameters:
triggers- The value for thetriggersattribute- Returns:
- An immutable NextPage instance
-
copyOf
Creates an immutable copy of aNextPagevalue. 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 NextPage instance
-
builder
Creates a builder forImmutableNextPage.ImmutableNextPage.builder() .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ItemState>) //triggerselements .targetId(io.dialob.session.engine.session.model.ItemId) // optionaltargetId.build();- Returns:
- A new ImmutableNextPage builder
-
pageIsInactive
-
anyErrors
-
gotoPage
-