1 package calculator.atoms.visitor;
2
3 import calculator.atoms.*;
4
5 /**
6 * Visitor design pattern for atoms
7 */
8 public abstract class AtomVisitor {
9
10 /**
11 * The Visitor can traverse a Real number (a subtype of Expression)
12 *
13 * @param r The Real number being visited
14 */
15 public abstract void visit(Real r);
16
17 /**
18 * The Visitor can traverse a Complex number (a subtype of Expression)
19 *
20 * @param c The Complex number being visited
21 */
22 public abstract void visit(Complex c);
23
24 /**
25 * The Visitor can traverse a Rationnal number (a subtype of Expression)
26 *
27 * @param q The Rationnal number being visited
28 */
29 public abstract void visit(Rationnal q);
30
31 /**
32 * The Visitor can traverse a Rationnal number (a subtype of Expression)
33 *
34 * @param i The Integer number being visited
35 */
36 public abstract void visit(IntegerAtom i);
37
38 }