Enum Class AtomType

java.lang.Object
java.lang.Enum<AtomType>
calculator.atoms.AtomType
All Implemented Interfaces:
Serializable, Comparable<AtomType>, Constable

public enum AtomType extends Enum<AtomType>
Enumeration of possible atom (number) types
  • Enum Constant Details

    • COMPLEX

      public static final AtomType COMPLEX
      Complex number, e.g. 3i, 5, 5+3ei
    • REAL

      public static final AtomType REAL
      Real number, e.g. 4.555, 5E-10, 5
    • RATIONNAL

      public static final AtomType RATIONNAL
      Rationnal number, e.g. 1/3, 5, 99/1010
    • INTEGER

      public static final AtomType INTEGER
      Integer e.g 3, 0, 5
  • Method Details

    • values

      public static AtomType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AtomType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null