harpoon.Tools.PatMat
Class Spec.LeafNumber

java.lang.Object
  extended by harpoon.Tools.PatMat.Spec.Leaf
      extended by harpoon.Tools.PatMat.Spec.LeafNumber
Enclosing class:
Spec

public static class Spec.LeafNumber
extends Spec.Leaf

Extension of Spec.Leaf which represents a explicit number in the specification.


Field Summary
 Number number
          Number.
 
Constructor Summary
Spec.LeafNumber(Number number)
          Constructs a new Spec.LeafNumber.
 
Method Summary
 void accept(Spec.LeafVisitor v)
          Applies v's visit method to this.
 String toString()
           
 
Methods inherited from class harpoon.Tools.PatMat.Spec.Leaf
toBop, toUop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

number

public final Number number
Number.

Constructor Detail

Spec.LeafNumber

public Spec.LeafNumber(Number number)
Constructs a new Spec.LeafNumber.

Parameters:
number - Number.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

accept

public void accept(Spec.LeafVisitor v)
Applies v's visit method to this. This is effectively a gludge to emulate multiple dispatch. Must be reimplemented by all subclasses of Spec.Leaf.
effects: Calls v.visit(this).

Specified by:
accept in class Spec.Leaf
See Also:
"Design Patterns pgs. 331-344"