public abstract class AbstractState extends Object implements State
Abstract base class for State definitions. Each state is owned
by exactly one owning Dialog. While an application
is running, Dialog (and the constituent States and
other configuration information) is immutable, so that it may be
shared by multiple simultaneous paths of execution.
| Constructor and Description |
|---|
AbstractState() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTransition(Transition transition)
|
Transition |
findTransition(String outcome)
Return the
Transition for the specified logical outcome,
if any; otherwise, return null. |
Dialog |
getDialog()
|
String |
getName()
|
Iterator |
getTransitionOutcomes()
|
void |
removeTransition(Transition transition)
Remove the specified
Transition from the Transitions
owned by this State, if it is currently registered. |
void |
setDialog(Dialog dialog)
|
void |
setName(String name)
|
public Dialog getDialog()
public String getName()
public Iterator getTransitionOutcomes()
Return an Iterator over the logical outcomes of
local Transitions for this State. If there are
no such Transitions, an empty Iterator is
returned.
getTransitionOutcomes in interface StateIterator over the logical outcomes of local
Transitions for this Statepublic Transition findTransition(String outcome)
Return the Transition for the specified logical outcome,
if any; otherwise, return null.
findTransition in interface Stateoutcome - Logical outcome for which to return a TransitionTransitionpublic void addTransition(Transition transition) throws IllegalArgumentException
Add the specified Transition to the Transitions owned
by this State.
transition - Transition to be addedIllegalArgumentException - if the specified Transition
cannot be added to this Statepublic void removeTransition(Transition transition)
Remove the specified Transition from the Transitions
owned by this State, if it is currently registered. Otherwise,
do nothing.
transition - Transition to be removedpublic void setName(String name)
name - New identifierCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.