Class PrologFloat

All Implemented Interfaces:
Serializable, Comparable<PrologTerm>

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

  • Constructor Details

    • PrologFloat

      public PrologFloat(String text)
    • PrologFloat

      public PrologFloat(String text, int line, int pos)
    • PrologFloat

      public PrologFloat(double value)
    • PrologFloat

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

      public PrologFloat(BigDecimal value)
    • PrologFloat

      public PrologFloat(BigDecimal value, int line, int pos)
  • Method Details

    • makeNeg

      public PrologNumeric makeNeg()
      Description copied from class: PrologNumeric
      Make negative representation of the numeric term
      Specified by:
      makeNeg in class PrologNumeric
      Returns:
      the negative variant of the numeric
    • getFloatValue

      public BigDecimal getFloatValue()
    • getNumber

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

      public String toString()
      Overrides:
      toString in class PrologTerm
    • 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