|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.dialog.impl.DialogImpl
public class DialogImpl
DialogImpl is a basic implementation of Dialog.
| Constructor Summary | |
|---|---|
DialogImpl()
|
|
| Method Summary | |
|---|---|
void |
addState(State state)
Add the specified State to the States owned by
this Dialog. |
void |
addTransition(Transition transition)
Add the specified Transition to the global Transitions
associated with this Dialog. |
State |
findState(String id)
Return the specified State, owned by this Dialog,
if any. |
Transition |
findTransition(String outcome)
Return the global Transition for the specified logical outcome,
if any; otherwise, return null. |
String |
getName()
Return the name of this Dialog. |
String |
getStart()
Return the name of the starting State for this
Dialog. |
Iterator |
getStateIds()
Return an Iterator over the names of States
that are owned by this Dialog. |
Iterator |
getTransitionOutcomes()
Return an Iterator over the logical outcomes of
global Transitions for this Dialog. |
void |
removeState(State state)
Remove the specified State from the States owned by
this Dialog, if it is currently registered. |
void |
removeTransition(Transition transition)
Remove the specified Transition from the global
Transitions associated with this Dialog, if it is
currently registered. |
void |
setName(String name)
Set the name of this Dialog. |
void |
setStart(String start)
Set the name of the starting State for this
Dialog. |
String |
toString()
Render a printable version of this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DialogImpl()
| Method Detail |
|---|
public String getName()
Return the name of this Dialog.
getName in interface Dialogpublic String getStart()
public Iterator getStateIds()
Return an Iterator over the names of States
that are owned by this Dialog. If there are no such
States, an empty Iterator is returned.
getStateIds in interface Dialogpublic Iterator getTransitionOutcomes()
Return an Iterator over the logical outcomes of
global Transitions for this Dialog. If there are
no such Transitions, an empty Iterator is
returned.
getTransitionOutcomes in interface Dialogpublic State findState(String id)
Return the specified State, owned by this Dialog,
if any. Otherwise, return null.
findState in interface Dialogid - Identifier of the requested Statepublic Transition findTransition(String outcome)
Return the global Transition for the specified logical outcome,
if any; otherwise, return null.
findTransition in interface Dialogoutcome - Logical outcome for which to return a Transitionpublic String toString()
Render a printable version of this instance.
toString in class Object
public void addState(State state)
throws IllegalArgumentException
Add the specified State to the States owned by
this Dialog.
state - State to be added
IllegalArgumentException - if there is already a State
with the specified id owned by this Dialog
public void addTransition(Transition transition)
throws IllegalArgumentException
Add the specified Transition to the global Transitions
associated with this Dialog.
transition - Transition to be added
IllegalArgumentException - if the specified Transition
cannot be added to this Statepublic void setName(String name)
Set the name of this Dialog.
name - New namepublic void setStart(String start)
public void removeState(State state)
Remove the specified State from the States owned by
this Dialog, if it is currently registered. Otherwise,
do nothing.
state - State to be removedpublic void removeTransition(Transition transition)
Remove the specified Transition from the global
Transitions associated with this Dialog, if it is
currently registered. Otherwise, do nothing.
transition - Transition to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||