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

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

public class TerminalEdge
extends Edge


Constructor Summary
TerminalEdge(TerminalRule rule, Token token)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean equals(TerminalEdge e)
           
 TerminalRule getRule()
          Get the rule that this edge is for.
 Token getToken()
          Get the input token that this terminal edge covers.
 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.
 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

TerminalEdge

public TerminalEdge(TerminalRule rule,
                    Token token)
Method Detail

getRule

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

Specified by:
getRule in class Edge

getToken

public Token getToken()
Get the input token that this terminal edge covers.


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

equals

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

equals

public boolean equals(TerminalEdge e)

hashCode

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

toString

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