|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNpdaVertex
public class NpdaVertex
A NpdaVertex object models a single vertex in an npda. This includes a label for the vertex, such as Q0, Q1, or Q2, and a set of transitions from the vertex to other vertices.
Constructor Summary | |
---|---|
NpdaVertex(java.lang.String label)
Create a new vertex with the given label. |
Method Summary | |
---|---|
void |
addTransition(NpdaTransition transition)
Add a new transition from this vertex to some other, destination vertex. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getLabel()
return the label of this vertex |
java.util.Set<NpdaTransition> |
getTransitions(char readSymbol,
char popSymbol)
Compute and return the set of all valid transitions that could be taken from this vertex, assuming we have just read the given readSymbol from the input string and popped the given popSymbol from the stack. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NpdaVertex(java.lang.String label)
Method Detail |
---|
public void addTransition(NpdaTransition transition)
transition
- the transition to be addedpublic java.util.Set<NpdaTransition> getTransitions(char readSymbol, char popSymbol)
readSymbol
- a symbol that has just being read from the
input stringpopSymbol
- a symbol that has just been popped from
the stack
public java.lang.String getLabel()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |