PositiveIntegerpublic class PositiveInteger extends NonNegativeInteger Custom class for supporting primitive XSD data type positiveInteger
positiveInteger is derived from nonNegativeInteger by setting the value of minInclusive to be 1.
This results in the standard mathematical concept of the positive integer numbers. The value space
of positiveInteger is the infinite set {1,2,...}. |
Fields Summary |
---|
private BigInteger | iMinInclusivevalidate the value against the xsd definition |
Constructors Summary |
---|
public PositiveInteger(byte[] val)
super(val);
checkValidity();
| public PositiveInteger(int signum, byte[] magnitude)
super(signum, magnitude);
checkValidity();
| public PositiveInteger(int bitLength, int certainty, Random rnd)
super(bitLength, certainty, rnd);
checkValidity();
| public PositiveInteger(int numBits, Random rnd)
super(numBits, rnd);
checkValidity();
| public PositiveInteger(String val)
super(val);
checkValidity();
| public PositiveInteger(String val, int radix)
super(val, radix);
checkValidity();
|
Methods Summary |
---|
private void | checkValidity()
if (compareTo(iMinInclusive) < 0) {
throw new NumberFormatException(
Messages.getMessage("badposInt00")
+ ": " + this);
}
| public java.lang.Object | writeReplace()Work-around for http://developer.java.sun.com/developer/bugParade/bugs/4378370.html
return new BigIntegerRep(toByteArray());
|
|