Class PrologFloat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PrologTerm>

    public final class PrologFloat
    extends PrologNumeric
    Representation for float numeric term.
    See Also:
    Serialized Form
    • Field Detail

      • MATH_CONTEXT

        public static final java.math.MathContext MATH_CONTEXT
      • value

        private final java.math.BigDecimal value
    • Constructor Detail

      • PrologFloat

        public PrologFloat​(java.lang.String text)
      • PrologFloat

        public PrologFloat​(java.lang.String text,
                           int line,
                           int pos)
      • PrologFloat

        public PrologFloat​(double value)
      • PrologFloat

        public PrologFloat​(double value,
                           int line,
                           int pos)
      • PrologFloat

        public PrologFloat​(java.math.BigDecimal value)
      • PrologFloat

        public PrologFloat​(java.math.BigDecimal value,
                           int line,
                           int pos)
    • Method Detail

      • getFloatValue

        public java.math.BigDecimal getFloatValue()
      • getNumber

        public java.lang.Number getNumber()
        Description copied from class: PrologNumeric
        Get numeric representation of the saved number.
        Specified by:
        getNumber in class PrologNumeric
        Returns:
        the saved number
      • isNegative

        public boolean isNegative()
        Description copied from class: PrologNumeric
        Check that the number is negative one
        Specified by:
        isNegative in class PrologNumeric
        Returns:
        true if the number is negative one, false otherwise