Class Visitor
java.lang.Object
visitor.Visitor
Visitor design pattern
-
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 an Integer (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)abstract voidThe Visitor can traverse a binary function (a subtype of Expression)abstract voidThe Visitor can traverse an unary function (a subtype of Expression)abstract voidThe Visitor can traverse an operation (a subtype of Expression)
-
Constructor Details
-
Visitor
public Visitor()
-
-
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 Real number being visited
-
visit
The Visitor can traverse a Rationnal number (a subtype of Expression)- Parameters:
q- The Real number being visited
-
visit
The Visitor can traverse an operation (a subtype of Expression)- Parameters:
o- The operation being visited
-
visit
The Visitor can traverse an Integer (a subtype of Expression)- Parameters:
i- The operation being visited
-
visit
The Visitor can traverse an unary function (a subtype of Expression)- Parameters:
f- The unary function being visited
-
visit
The Visitor can traverse a binary function (a subtype of Expression)- Parameters:
f- The binary function being visited
-