| Constructor and Description |
|---|
GraphImpl(String name,
int version) |
GraphImpl(String name,
int version,
boolean keepHistory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(Node node) |
void |
addTransition(Transition transition) |
boolean |
getKeepHistory() |
String |
getName()
Returns the graph's name, which should be unique.
|
Node |
getNode(int id)
Returns the graph's node with the given id.
|
Collection<Node> |
getNodes()
Returns the list of all nodes in the graph.
|
List<Transition> |
getOutputTransitions(Node node)
Returns a list of transitions which have the given node as their starting
point.
|
Transition |
getOutputTransitions(Node node,
String name)
Returns the transition which has the given node as their starting point
and the given name, or
null if no such transition exists. |
Node |
getStartNode()
Returns the graph's start node.
|
List<Transition> |
getTransitions()
Returns the list of all transitions in the graph.
|
int |
getVersion()
Returns the version number of the graph.
|
void |
setStartNode(Node startNode) |
public GraphImpl(String name, int version)
public GraphImpl(String name, int version, boolean keepHistory)
public String getName()
Graphpublic int getVersion()
GraphgetVersion in interface Graphpublic boolean getKeepHistory()
getKeepHistory in interface Graphpublic Node getStartNode()
GraphGraphInstance. A non-empty graph must define
a start node.getStartNode in interface Graphpublic Node getNode(int id)
Graphpublic Collection<Node> getNodes()
Graphpublic List<Transition> getTransitions()
GraphgetTransitions in interface Graphpublic List<Transition> getOutputTransitions(Node node)
Graphnull.getOutputTransitions in interface Graphnode - A node belonging to this graphpublic Transition getOutputTransitions(Node node, String name)
Graphnull if no such transition exists.getOutputTransitions in interface Graphnode - A node belonging to this graphname - A transition namepublic void setStartNode(Node startNode)
public void addNode(Node node)
public void addTransition(Transition transition)
Copyright © 2018. All rights reserved.