Class Term.ConstD

  • Enclosing class:
    Term

    public static final class Term.ConstD
    extends Term.Const
    A floating point constant, e.g. 2.97665 or 1.4e-12.
    • Constructor Detail

      • ConstD

        public ConstD​(double value)
    • Method Detail

      • lookup

        public static Term.ConstD lookup​(double value)
      • getValue

        public double getValue()
      • getRetType

        public int getRetType()
        Description copied from class: Term
        Gets the term's "natural" return type.
        Specified by:
        getRetType in class Term
        Returns:
        the type, should always be one of the TYPE_X constants defined in this class.
      • toB

        protected boolean toB()
        Specified by:
        toB in class Term.Const
      • toI

        protected int toI()
        Specified by:
        toI in class Term.Const
      • toD

        protected double toD()
        Specified by:
        toD in class Term.Const
      • toString

        public String toString()
        Description copied from class: Term
        Returns a string representation of this term which can be used for debugging.
        Specified by:
        toString in class Term
      • accept

        public <T> T accept​(TermVisitor<T> visitor)
        Description copied from class: Term
        Visitor support.
        Specified by:
        accept in class Term
        Parameters:
        visitor - A visitor.
      • eq

        public static boolean eq​(double v1,
                                 double v2)
        Special comparison only valid for numbers whose exponent is -1 to +1.