NonNegativeIntegerpublic class NonNegativeInteger extends BigInteger Custom class for supporting primitive XSD data type nonNegativeInteger |
Fields Summary |
---|
private BigInteger | zerovalidate the value against the xsd definition |
Constructors Summary |
---|
public NonNegativeInteger(byte[] val)
super(val);
checkValidity();
| public NonNegativeInteger(int signum, byte[] magnitude)
super(signum, magnitude);
checkValidity();
| public NonNegativeInteger(int bitLength, int certainty, Random rnd)
super(bitLength, certainty, rnd);
checkValidity();
| public NonNegativeInteger(int numBits, Random rnd)
super(numBits, rnd);
checkValidity();
| public NonNegativeInteger(String val)
super(val);
checkValidity();
| public NonNegativeInteger(String val, int radix)
super(val, radix);
checkValidity();
|
Methods Summary |
---|
private void | checkValidity()
if (compareTo(zero) < 0) {
throw new NumberFormatException(
Messages.getMessage("badNonNegInt00")
+ ": " + this);
}
| public java.lang.Object | writeReplace()Work-around for http://developer.java.sun.com/developer/bugParade/bugs/4378370.html
return new BigIntegerRep(toByteArray());
|
|