se.chalmers.cs.gf.parse.chart
Class NonTerminalEdge

java.lang.Object
  extended by se.chalmers.cs.gf.parse.chart.Edge
      extended by se.chalmers.cs.gf.parse.chart.NonTerminalEdge

public class NonTerminalEdge
extends Edge

A parse chart edge produced by a non-terminal rule.


Constructor Summary
NonTerminalEdge(NonTerminalEdge e)
           
NonTerminalEdge(NonTerminalRule rule)
           
 
Method Summary
 boolean equals(NonTerminalEdge e)
           
 boolean equals(java.lang.Object o)
           
 NonTerminalRule getRule()
          Get the rule that this edge is for.
 int hashCode()
           
 boolean isActive()
          Checks if this edge is active, that is, if it is still missing some symbol.
 boolean needs(Category c)
          Checks if the next symbol needed is the given category.
 void stepForward()
          Move the dot one step forward.
 java.lang.String toString()
           
 
Methods inherited from class se.chalmers.cs.gf.parse.chart.Edge
getCategory
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonTerminalEdge

public NonTerminalEdge(NonTerminalRule rule)

NonTerminalEdge

public NonTerminalEdge(NonTerminalEdge e)
Method Detail

getRule

public NonTerminalRule getRule()
Get the rule that this edge is for.

Specified by:
getRule in class Edge

needs

public boolean needs(Category c)
Checks if the next symbol needed is the given category.

Specified by:
needs in class Edge

isActive

public boolean isActive()
Checks if this edge is active, that is, if it is still missing some symbol.

Specified by:
isActive in class Edge

stepForward

public void stepForward()
Move the dot one step forward.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(NonTerminalEdge e)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class Edge