Class AtomVisitor
java.lang.Object
calculator.atoms.visitor.AtomVisitor
- Direct Known Subclasses:
AtomCaster, AtomComparator
Visitor design pattern for atoms
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidThe Visitor can traverse a Complex number (a subtype of Expression)abstract voidvisit(IntegerAtom i) The Visitor can traverse a Rationnal number (a subtype of Expression)abstract voidThe Visitor can traverse a Rationnal number (a subtype of Expression)abstract voidThe Visitor can traverse a Real number (a subtype of Expression)
-
Constructor Details
-
AtomVisitor
public AtomVisitor()
-
-
Method Details
-
visit
The Visitor can traverse a Real number (a subtype of Expression)- Parameters:
r- The Real number being visited
-
visit
The Visitor can traverse a Complex number (a subtype of Expression)- Parameters:
c- The Complex number being visited
-
visit
The Visitor can traverse a Rationnal number (a subtype of Expression)- Parameters:
q- The Rationnal number being visited
-
visit
The Visitor can traverse a Rationnal number (a subtype of Expression)- Parameters:
i- The Integer number being visited
-