Class PrologInt

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

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

      • cachedValues

        private static final java.util.Map<java.lang.String,​java.math.BigInteger> cachedValues
      • value

        private final java.math.BigInteger value
    • Constructor Detail

      • PrologInt

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

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

        public PrologInt​(long value)
      • PrologInt

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

        public PrologInt​(java.math.BigInteger value)
      • PrologInt

        public PrologInt​(java.math.BigInteger value,
                         int line,
                         int pos)
    • Method Detail

      • valueOf

        private static java.math.BigInteger valueOf​(java.lang.String text)
      • getText

        public java.lang.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 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
      • getIntValue

        public java.math.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