Class AtomVisitor

java.lang.Object
calculator.atoms.visitor.AtomVisitor
Direct Known Subclasses:
AtomCaster, AtomComparator

public abstract class AtomVisitor extends Object
Visitor design pattern for atoms
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    The Visitor can traverse a Complex number (a subtype of Expression)
    abstract void
    The Visitor can traverse a Rationnal number (a subtype of Expression)
    abstract void
    The Visitor can traverse a Rationnal number (a subtype of Expression)
    abstract void
    The Visitor can traverse a Real number (a subtype of Expression)

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AtomVisitor

      public AtomVisitor()
  • Method Details

    • visit

      public abstract void visit(Real r)
      The Visitor can traverse a Real number (a subtype of Expression)
      Parameters:
      r - The Real number being visited
    • visit

      public abstract void visit(Complex c)
      The Visitor can traverse a Complex number (a subtype of Expression)
      Parameters:
      c - The Complex number being visited
    • visit

      public abstract void visit(Rationnal q)
      The Visitor can traverse a Rationnal number (a subtype of Expression)
      Parameters:
      q - The Rationnal number being visited
    • visit

      public abstract void visit(IntegerAtom i)
      The Visitor can traverse a Rationnal number (a subtype of Expression)
      Parameters:
      i - The Integer number being visited