Class BinaryFunction
java.lang.Object
calculator.functions.BinaryFunction
- All Implemented Interfaces:
Expression
- Direct Known Subclasses:
Log
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept method to implement the visitor design pattern to traverse arithmetic expressions.booleanabstract AtomAbstract method representing the actual function result of two complexesabstract Atomop(IntegerAtom i1, IntegerAtom i2) Abstract method representing the actual function result of two integersabstract AtomAbstract method representing the actual function result of two Rationnalsabstract AtomAbstract method representing the actual function result of two realsvoidsetFirstArg(Expression firstArg) voidsetSecondArg(Expression secondArg) void
-
Field Details
-
symbol
-
-
Constructor Details
-
BinaryFunction
-
-
Method Details
-
op
-
op
-
op
Abstract method representing the actual function result of two integers- Parameters:
i1- first Integer of the binary operationi2- second Integer of the binary operation- Returns:
- result of the function on two IntegerAtoms
-
op
-
accept
Accept method to implement the visitor design pattern to traverse arithmetic expressions.- Specified by:
acceptin interfaceExpression- Parameters:
v- The visitor object
-
equals
-
getSymbol
-
setSymbol
-
getFirstArg
-
setFirstArg
-
getSecondArg
-
setSecondArg
-