|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
S - the type of states in this graphL - the type of transition labels in this graphpublic interface StateGraph<S,L>
A state graph consists of a set of states and a set of transitions between
them. StateGraph instances are immutable and are safe for
concurrent use. Modifying a graph is performed by obtaining an editor from
the graph.
There is no requirement that the graph be disconnected nor is the graph
required to be acyclic.
| Method Summary | |
|---|---|
S |
getInitialState()
The single initial state. |
java.util.Set<S> |
getInitialStates()
An immutable set of the states that are not the target of any transition. |
java.util.Set<java.util.List<StateTransition<S,L>>> |
getMultiPaths(java.util.Set<S> initial,
java.util.Set<S> terminal,
PathType type)
A set containing every possible path (represented as a list of transitions) from any initial state to any terminal state. |
java.util.List<StateTransition<S,L>> |
getPath(S initial,
S terminal,
PathType type)
A convenience method that may be called to obtain the single existing path from an initial state to a terminal state. |
java.util.Set<java.util.List<StateTransition<S,L>>> |
getPaths(S initial,
S terminal,
PathType type)
A set containing every possible path (represented as a list of transitions) from the initial state to the terminal state. |
S |
getTerminalState()
The single terminal state. |
java.util.Set<S> |
getTerminalStates()
An immutable set of the states that are not the source of any transition. |
StateTransition<S,L> |
getTransition(S source,
L label,
S target)
Obtains the specified state transition from this graph. |
java.util.Set<StateTransition<S,L>> |
getTransitionsMatching(S source,
L label,
S target)
Returns an immutable set of all transitions that match the supplied parameters. |
StateGraphEditor<S,L> |
newEditor()
Obtains an editor which may be used to edit a copy of this graph. |
java.util.Set<S> |
states()
The set of states in this graph. |
java.util.Set<StateTransition<S,L>> |
transitions()
An immutable set containing every transition in the graph. |
| Method Detail |
|---|
java.util.Set<S> states()
java.util.Set<S> getTerminalStates()
S getTerminalState()
throws ProntoStateException
ProntoStateException - if there is more than terminal statejava.util.Set<S> getInitialStates()
S getInitialState()
throws ProntoStateException
ProntoStateException - if there is more than initial state
StateTransition<S,L> getTransition(S source,
L label,
S target)
source - the source of the transition, not nulllabel - the transition's label, not nulltarget - the target of the transition, not null
java.util.Set<StateTransition<S,L>> getTransitionsMatching(S source,
L label,
S target)
source - the required transition source, or null to match any sourcelabel - the required transition label, or null to match any labeltarget - the required transition target, or null to match any target
java.util.Set<StateTransition<S,L>> transitions()
java.util.List<StateTransition<S,L>> getPath(S initial,
S terminal,
PathType type)
throws ProntoStateException
initial - the state at which path begins, not nullterminal - the state at which path terminates, may be nulltype - a constraint on the path
ProntoStateException - if there is more than one path between an initial state and a
terminal state
java.util.Set<java.util.List<StateTransition<S,L>>> getPaths(S initial,
S terminal,
PathType type)
initial - the state at which paths begin, not nullterminal - the state at which paths terminate, may be nulltype - a constraint on the paths
java.util.Set<java.util.List<StateTransition<S,L>>> getMultiPaths(java.util.Set<S> initial,
java.util.Set<S> terminal,
PathType type)
initial - the states at which paths begin, not nullterminal - the states at which paths terminate, may be nulltype - a constraint on the paths
StateGraphEditor<S,L> newEditor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||