AtomVisitor.java

package calculator.atoms.visitor;

import calculator.atoms.*;

/**
 * Visitor design pattern for atoms
 */
public abstract class AtomVisitor {

	/**
	 * The Visitor can traverse a Real number (a subtype of Expression)
	 *
	 * @param r The Real number being visited
	 */
	public abstract void visit(Real r);

	/**
	 * The Visitor can traverse a Complex number (a subtype of Expression)
	 *
	 * @param c The Complex number being visited
	 */
	public abstract void visit(Complex c);

	/**
	 * The Visitor can traverse a Rationnal number (a subtype of Expression)
	 *
	 * @param q The Rationnal number being visited
	 */
	public abstract void visit(Rationnal q);

	/**
	 * The Visitor can traverse a Rationnal number (a subtype of Expression)
	 *
	 * @param i The Integer number being visited
	 */
	public abstract void visit(IntegerAtom i);

}