|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tomgibara.pronto.state.impl.StateGraphImpl<S,L>
public class StateGraphImpl<S,L>
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
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. |
int |
hashCode()
|
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.lang.String |
toString()
|
java.util.Set<StateTransition<S,L>> |
transitions()
An immutable set containing every transition in the graph. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.util.Set<S> states()
StateGraph
states in interface StateGraph<S,L>public java.util.Set<S> getTerminalStates()
StateGraph
getTerminalStates in interface StateGraph<S,L>
public S getTerminalState()
throws ProntoStateException
StateGraph
getTerminalState in interface StateGraph<S,L>ProntoStateException - if there is more than terminal statepublic java.util.Set<S> getInitialStates()
StateGraph
getInitialStates in interface StateGraph<S,L>
public S getInitialState()
throws ProntoStateException
StateGraph
getInitialState in interface StateGraph<S,L>ProntoStateException - if there is more than initial state
public StateTransition<S,L> getTransition(S source,
L label,
S target)
StateGraph
getTransition in interface StateGraph<S,L>source - the source of the transition, not nulllabel - the transition's label, not nulltarget - the target of the transition, not null
public java.util.Set<StateTransition<S,L>> getTransitionsMatching(S source,
L label,
S target)
StateGraph
getTransitionsMatching in interface StateGraph<S,L>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
public java.util.Set<StateTransition<S,L>> transitions()
StateGraph
transitions in interface StateGraph<S,L>
public java.util.Set<java.util.List<StateTransition<S,L>>> getMultiPaths(java.util.Set<S> initial,
java.util.Set<S> terminal,
PathType type)
StateGraph
getMultiPaths in interface StateGraph<S,L>initial - the states at which paths begin, not nullterminal - the states at which paths terminate, may be nulltype - a constraint on the paths
public java.util.Set<java.util.List<StateTransition<S,L>>> getPaths(S initial,
S terminal,
PathType type)
StateGraph
getPaths in interface StateGraph<S,L>initial - the state at which paths begin, not nullterminal - the state at which paths terminate, may be nulltype - a constraint on the paths
public java.util.List<StateTransition<S,L>> getPath(S initial,
S terminal,
PathType type)
throws ProntoStateException
StateGraph
getPath in interface StateGraph<S,L>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 statepublic StateGraphEditor<S,L> newEditor()
StateGraph
newEditor in interface StateGraph<S,L>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||