Class NegativeInteger

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

    public class NegativeInteger
    extends NonPositiveInteger
    Custom class for supporting primitive XSD data type negativeinteger negativeInteger is derived from nonPositiveInteger by setting the value of maxInclusive to be -1. This results in the standard mathematical concept of the negative integers. The value space of negativeInteger is the infinite set {...,-2,-1}. The base type of negativeInteger is nonPositiveInteger.
    Author:
    Chris Haddad
    See Also:
    XML Schema 3.3.15, Serialized Form
    • Field Summary

      • Fields inherited from class java.math.BigInteger

        ONE, TEN, TWO, ZERO
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object writeReplace()
      Work-around for http://developer.java.sun.com/developer/bugParade/bugs/4378370.html
      • Methods inherited from class java.math.BigInteger

        abs, add, and, andNot, bitCount, bitLength, byteValueExact, clearBit, compareTo, divide, divideAndRemainder, doubleValue, equals, flipBit, floatValue, gcd, getLowestSetBit, hashCode, intValue, intValueExact, isProbablePrime, longValue, longValueExact, max, min, mod, modInverse, modPow, multiply, negate, nextProbablePrime, not, or, pow, probablePrime, remainder, setBit, shiftLeft, shiftRight, shortValueExact, signum, sqrt, sqrtAndRemainder, subtract, testBit, toByteArray, toString, toString, valueOf, xor
      • Methods inherited from class java.lang.Number

        byteValue, shortValue
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NegativeInteger

        public NegativeInteger​(byte[] val)
      • NegativeInteger

        public NegativeInteger​(int signum,
                               byte[] magnitude)
      • NegativeInteger

        public NegativeInteger​(int bitLength,
                               int certainty,
                               java.util.Random rnd)
      • NegativeInteger

        public NegativeInteger​(int numBits,
                               java.util.Random rnd)
      • NegativeInteger

        public NegativeInteger​(java.lang.String val)
      • NegativeInteger

        public NegativeInteger​(java.lang.String val,
                               int radix)
    • Method Detail

      • writeReplace

        public java.lang.Object writeReplace()
                                      throws java.io.ObjectStreamException
        Work-around for http://developer.java.sun.com/developer/bugParade/bugs/4378370.html
        Overrides:
        writeReplace in class NonPositiveInteger
        Returns:
        BigIntegerRep
        Throws:
        java.io.ObjectStreamException