dk.brics.servletvalidator.balancing
Class DecoratingBalancingVisitor

java.lang.Object
  extended by dk.brics.servletvalidator.grammar.AbstractGrammarEntityVisitor
      extended by dk.brics.servletvalidator.balancing.AbstractBalancingVisitor
          extended by dk.brics.servletvalidator.balancing.DecoratingBalancingVisitor
All Implemented Interfaces:
GrammarEntityVisitor
Direct Known Subclasses:
FullyQualifiedGrammarVisitor, TagInlineVisitor

public abstract class DecoratingBalancingVisitor
extends AbstractBalancingVisitor

Author:
schwarz

Field Summary
 AbstractBalancingVisitor balanceChecker
           
protected  Map<NonTerminal,Integer> cValues
           
protected  Map<NonTerminal,Integer> dValues
           
 
Fields inherited from class dk.brics.servletvalidator.grammar.AbstractGrammarEntityVisitor
marked
 
Constructor Summary
protected DecoratingBalancingVisitor(ParenthesisModel model, AbstractBalancingVisitor balanceChecker)
           
 
Method Summary
 Integer c(NonTerminal n)
          Returns the value of the c function for the nonterminal n.
 Integer d(NonTerminal n)
           
 void setC(NonTerminal n, Integer c)
           
 void setD(NonTerminal n, Integer d)
          Sets the d value for the non terminal n to d
 
Methods inherited from class dk.brics.servletvalidator.balancing.AbstractBalancingVisitor
c, c, c, d, d, d
 
Methods inherited from class dk.brics.servletvalidator.grammar.AbstractGrammarEntityVisitor
apply, apply, apply, apply, getPath, in, in, in, isMarked, mark, out, out, out, print, shouldPrettyPrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

balanceChecker

public AbstractBalancingVisitor balanceChecker

cValues

protected Map<NonTerminal,Integer> cValues

dValues

protected Map<NonTerminal,Integer> dValues
Constructor Detail

DecoratingBalancingVisitor

protected DecoratingBalancingVisitor(ParenthesisModel model,
                                     AbstractBalancingVisitor balanceChecker)
Method Detail

c

public Integer c(NonTerminal n)
Description copied from class: AbstractBalancingVisitor
Returns the value of the c function for the nonterminal n. May return null if the c value is unknown for n (I.E if the non terminal was added after the c values were calculated)

Specified by:
c in class AbstractBalancingVisitor
Returns:

d

public Integer d(NonTerminal n)
Specified by:
d in class AbstractBalancingVisitor

setC

public void setC(NonTerminal n,
                 Integer c)
Specified by:
setC in class AbstractBalancingVisitor

setD

public void setD(NonTerminal n,
                 Integer d)
Description copied from class: AbstractBalancingVisitor
Sets the d value for the non terminal n to d

Specified by:
setD in class AbstractBalancingVisitor


Copyright © 2008 Mathias Schwarz.