dk.brics.string.grammar.operations
Class GrammarAsDirectedGraph

java.lang.Object
  extended by dk.brics.string.grammar.operations.GrammarAsDirectedGraph
All Implemented Interfaces:
DirectedGraph<Nonterminal,Component>

public class GrammarAsDirectedGraph
extends Object
implements DirectedGraph<Nonterminal,Component>

Directed graph facade for grammars.


Constructor Summary
GrammarAsDirectedGraph(Grammar g)
          Constructs a new facade.
 
Method Summary
 List<Nonterminal> getNodes()
          Returns the (unmodifiable) list of nodes of this graph.
 List<Collection<Nonterminal>> getSuccesors()
          Returns a collection of successor nodes for each node.
 Component makeComponent()
          Makes a new empty component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrammarAsDirectedGraph

public GrammarAsDirectedGraph(Grammar g)
Constructs a new facade.

Parameters:
g -
Method Detail

getNodes

public List<Nonterminal> getNodes()
Description copied from interface: DirectedGraph
Returns the (unmodifiable) list of nodes of this graph.

Specified by:
getNodes in interface DirectedGraph<Nonterminal,Component>

getSuccesors

public List<Collection<Nonterminal>> getSuccesors()
Description copied from interface: DirectedGraph
Returns a collection of successor nodes for each node.

Specified by:
getSuccesors in interface DirectedGraph<Nonterminal,Component>

makeComponent

public Component makeComponent()
Description copied from interface: DirectedGraph
Makes a new empty component.

Specified by:
makeComponent in interface DirectedGraph<Nonterminal,Component>


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.