Interface WizardState<ST>
- Type Parameters:
ST
- the generic type of the state machine
- All Known Subinterfaces:
BaseWizardState<ST>
public interface WizardState<ST>
The interface
WizardState
represents a state in a wizard. This interface provides methods
to manage the navigation and identification of different wizard states, including whether the
state is the first, last, or has previous and next states.-
Method Summary
Modifier and TypeMethodDescriptiondefault String
getName()
Gets the simple name of thisWizardState
object.Gets theWizardStateInfo
object.void
Go to the nextWizardState
object.void
goPrevious
(ST input) Go to the previousWizardState
object.default boolean
hasNext()
Checks if thisWizardState
object has a nextWizardState
object.default boolean
Checks if thisWizardState
object has a previousWizardState
object.default boolean
isFirst()
Checks if thisWizardState
object is the firstWizardState
object.default boolean
isLast()
Checks if thisWizardState
object is the lastWizardState
object.default void
setFirst
(boolean first) Sets the first flag.default void
setLast
(boolean last) Sets the last flag.default void
Sets the name.default void
setNext
(boolean next) Sets the next flag.default void
setPrevious
(boolean previous) Sets the previous flag.void
setWizardStateInfo
(WizardStateInfo wizardStateInfo) Sets the new wizard state info object.
-
Method Details
-
getName
Gets the simple name of thisWizardState
object. If aWizardStateInfo
is present, it returns the name from it; otherwise, it returns the simple class name of this object.- Returns:
- the simple name of this
WizardState
object
-
goNext
Go to the nextWizardState
object.- Parameters:
input
- theWizardStateMachine
object
-
goPrevious
Go to the previousWizardState
object.- Parameters:
input
- theWizardStateMachine
object
-
hasNext
default boolean hasNext()Checks if thisWizardState
object has a nextWizardState
object. If aWizardStateInfo
is present, it returns the next flag from it; otherwise, it defaults to true.- Returns:
- true if this
WizardState
object has a nextWizardState
object, otherwise false
-
hasPrevious
default boolean hasPrevious()Checks if thisWizardState
object has a previousWizardState
object. If aWizardStateInfo
is present, it returns the previous flag from it; otherwise, it defaults to true.- Returns:
- true if this
WizardState
object has a previousWizardState
object, otherwise false
-
isFirst
default boolean isFirst()Checks if thisWizardState
object is the firstWizardState
object. If aWizardStateInfo
is present, it returns the first flag from it; otherwise, it defaults to false.- Returns:
- true if this
WizardState
object is the firstWizardState
object, otherwise false
-
isLast
default boolean isLast()Checks if thisWizardState
object is the lastWizardState
object. If aWizardStateInfo
is present, it returns the last flag from it; otherwise, it defaults to false.- Returns:
- true if this
WizardState
object is the lastWizardState
object, otherwise false
-
getWizardStateInfo
WizardStateInfo getWizardStateInfo()Gets theWizardStateInfo
object.- Returns:
- the
WizardStateInfo
object
-
setWizardStateInfo
Sets the new wizard state info object.- Parameters:
wizardStateInfo
- the new wizard state info object
-
setNext
default void setNext(boolean next) Sets the next flag.- Parameters:
next
- the new next flag
-
setFirst
default void setFirst(boolean first) Sets the first flag.- Parameters:
first
- the new first flag
-
setLast
default void setLast(boolean last) Sets the last flag.- Parameters:
last
- the new last flag
-
setName
Sets the name.- Parameters:
name
- the new name
-
setPrevious
default void setPrevious(boolean previous) Sets the previous flag.- Parameters:
previous
- the new previous flag
-