Interface Atom
- All Superinterfaces:
Expression
- All Known Implementing Classes:
Complex, IntegerAtom, Rationnal, Real
Atom abstract class
An Atom represents a number (or an operand of operations).
The implemented number (atom) types are present in the AtomType enum
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(AtomVisitor aV) accepts the specific AtomVisitorapply(BinaryFunction f, Atom a) Applies an Binary between two atoms of the same concrete type The function supposes that both atoms are of the same concrete typeApplies an operation on the atomApplies an operation between two atoms of the same concrete type The function supposes that both atoms are of the same concrete typeMethods inherited from interface Expression
accept
-
Method Details
-
apply
-
apply
Applies an Binary between two atoms of the same concrete type The function supposes that both atoms are of the same concrete type- Parameters:
f- the binary function to with this atom as first parametera- the other atom- Returns:
- the result of the operation having the same type as a
- See Also:
-
apply
Applies an operation on the atom- Parameters:
o- the unary operation to apply- Returns:
- the result of the operation
-
accept
accepts the specific AtomVisitor- Parameters:
aV- The Atomvisitor object being passed as a parameter
-