Class PrologInt

All Implemented Interfaces:
Serializable, Comparable<PrologTerm>

public final class PrologInt extends PrologNumeric
Representation of integer numeric term.
See Also:
  • Field Details

  • Constructor Details

    • PrologInt

      public PrologInt(String text)
    • PrologInt

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

      public PrologInt(long value)
    • PrologInt

      public PrologInt(long value, int line, int pos)
    • PrologInt

      public PrologInt(BigInteger value)
    • PrologInt

      public PrologInt(BigInteger value, int line, int pos)
  • Method Details

    • valueOf

      private static BigInteger valueOf(String text)
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class PrologTerm
    • getText

      public String getText()
      Description copied from class: PrologTerm
      Get the term text.
      Overrides:
      getText in class PrologNumeric
      Returns:
      the term text, must not be null
    • 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
    • getIntValue

      public BigInteger getIntValue()
      Get the value as BigInteger
      Returns:
      the value as BigInteger
    • 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