| Modifier and Type | Field and Description |
|---|---|
protected boolean |
accept |
protected DirectedGraph<? extends Node> |
graph |
protected int |
id |
protected int |
index |
protected boolean |
starting |
protected Set<Transition> |
transitions |
protected int |
x |
protected int |
y |
| Constructor and Description |
|---|
Node(DirectedGraph<? extends Node> graph,
int id)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTransition(Transition transition)
Add one transition (edge) to this node
|
abstract Set<NfaNode> |
eclosure()
ε-closure is defined as the node, plus all other nodes that are
reachable from this node with an ε transition, recursively.
|
List<Transition> |
getCodeTransitions() |
DirectedGraph<? extends Node> |
getGraph() |
int |
getId() |
int |
getIndex() |
Set<Transition> |
getTransitions() |
int |
getX() |
int |
getY() |
boolean |
isAccept() |
boolean |
isStarting() |
void |
removeTransition(Transition transition)
Remove a transition from this node
|
void |
setAccept(boolean accept) |
void |
setIndex(int index) |
void |
setStarting(boolean starting) |
void |
setX(int x) |
void |
setY(int y) |
String |
toString() |
protected int id
protected int index
protected DirectedGraph<? extends Node> graph
protected Set<Transition> transitions
protected boolean accept
protected boolean starting
protected int x
protected int y
public Node(DirectedGraph<? extends Node> graph, int id)
graph - the graph to which this node belongsid - the identifier for the nodepublic abstract Set<NfaNode> eclosure()
public boolean isAccept()
public void setAccept(boolean accept)
accept - the accept to setpublic boolean isStarting()
public void setStarting(boolean starting)
starting - the starting to setpublic void addTransition(Transition transition)
transition - is the node transitionpublic void removeTransition(Transition transition)
transition - is the node transitionpublic List<Transition> getCodeTransitions()
public Set<Transition> getTransitions()
public int getId()
public DirectedGraph<? extends Node> getGraph()
public int getIndex()
public void setIndex(int index)
index - the index to setpublic int getX()
public void setX(int x)
x - the x to setpublic int getY()
public void setY(int y)
y - the y to setCopyright © 2017. All rights reserved.