|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.dialog.basic.config.AbstractState
public abstract class AbstractState
Abstract base class for State
definitions. Each state is owned
by exactly one owning Dialog
. While an application
is running, Dialog
(and the constituent State
s and
other configuration information) is immutable, so that it may be
shared by multiple simultaneous paths of execution.
Constructor Summary | |
---|---|
AbstractState()
|
Method Summary | |
---|---|
void |
addTransition(Transition transition)
Add the specified Transition to the Transition s owned
by this State . |
Transition |
findTransition(String outcome)
Return the Transition for the specified logical outcome,
if any; otherwise, return null . |
Dialog |
getDialog()
|
String |
getName()
Return the identifier of this |
Iterator |
getTransitionOutcomes()
Return an |
void |
removeTransition(Transition transition)
Remove the specified Transition from the Transition s
owned by this State , if it is currently registered. |
void |
setDialog(Dialog dialog)
Set the Dialog that owns this State . |
void |
setName(String name)
Set the identifier of this State , which must be unique
among the State s owned by the same Dialog . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractState()
Method Detail |
---|
public Dialog getDialog()
Return the Dialog
that owns this State
.
getDialog
in interface State
Dialog
this State
belongs topublic String getName()
Return the identifier of this State
, which must be unique
among the State
s owned by the same Dialog
.
getName
in interface State
State
public Iterator getTransitionOutcomes()
Return an Iterator
over the logical outcomes of
local Transition
s for this State
. If there are
no such Transition
s, an empty Iterator
is
returned.
getTransitionOutcomes
in interface State
Iterator
over the logical outcomes of local
Transition
s for this State
public Transition findTransition(String outcome)
Return the Transition
for the specified logical outcome,
if any; otherwise, return null
.
findTransition
in interface State
outcome
- Logical outcome for which to return a Transition
Transition
public void addTransition(Transition transition) throws IllegalArgumentException
Add the specified Transition
to the Transition
s owned
by this State
.
transition
- Transition
to be added
IllegalArgumentException
- if the specified Transition
cannot be added to this State
public void removeTransition(Transition transition)
Remove the specified Transition
from the Transition
s
owned by this State
, if it is currently registered. Otherwise,
do nothing.
transition
- Transition
to be removedpublic void setDialog(Dialog dialog)
public void setName(String name)
Set the identifier of this State
, which must be unique
among the State
s owned by the same Dialog
.
name
- New identifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |