Interface Atom

All Superinterfaces:
Expression
All Known Implementing Classes:
Complex, IntegerAtom, Rationnal, Real

public interface Atom extends Expression
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 Type
    Method
    Description
    void
    accepts the specific AtomVisitor
    Applies an Binary between two atoms of the same concrete type The function supposes that both atoms are of the same concrete type
    Applies an operation on the atom
    Applies an operation between two atoms of the same concrete type The function supposes that both atoms are of the same concrete type

    Methods inherited from interface Expression

    accept
  • Method Details

    • apply

      Atom apply(Operation o, Atom a)
      Applies an operation between two atoms of the same concrete type The function supposes that both atoms are of the same concrete type
      Parameters:
      o - the operation to apply
      a - the other atom
      Returns:
      the result of the operation having the same type as a
      See Also:
    • apply

      Atom apply(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 type
      Parameters:
      f - the binary function to with this atom as first parameter
      a - the other atom
      Returns:
      the result of the operation having the same type as a
      See Also:
    • apply

      Atom apply(UnaryFunction o)
      Applies an operation on the atom
      Parameters:
      o - the unary operation to apply
      Returns:
      the result of the operation
    • accept

      void accept(AtomVisitor aV)
      accepts the specific AtomVisitor
      Parameters:
      aV - The Atomvisitor object being passed as a parameter