FileDocCategorySizeDatePackage
NonPositiveInteger.javaAPI DocApache Axis 1.43105Sat Apr 22 18:57:28 BST 2006org.apache.axis.types

NonPositiveInteger

public class NonPositiveInteger extends BigInteger
Custom class for supporting primitive XSD data type nonPositiveInteger nonPositiveInteger is derived from integer by setting the value of maxInclusive to be 0. This results in the standard mathematical concept of the non-positive integers. The value space of nonPositiveInteger is the infinite set {...,-2,-1,0}.
author
Chris Haddad
see
XML Schema 3.3.14

Fields Summary
private BigInteger
zero
validate the value against the xsd definition
Constructors Summary
public NonPositiveInteger(byte[] val)

        super(val);
        checkValidity();
    
public NonPositiveInteger(int signum, byte[] magnitude)

        super(signum, magnitude);
        checkValidity();
    
public NonPositiveInteger(int bitLength, int certainty, Random rnd)

        super(bitLength, certainty, rnd);
        checkValidity();
    
public NonPositiveInteger(int numBits, Random rnd)

        super(numBits, rnd);
        checkValidity();
    
public NonPositiveInteger(String val)

        super(val);
        checkValidity();
    
public NonPositiveInteger(String val, int radix)

        super(val, radix);
        checkValidity();
    
Methods Summary
private voidcheckValidity()

       
        if (compareTo(zero) > 0) {
            throw new NumberFormatException(
                    Messages.getMessage("badNonPosInt00")
                    + ":  " + this);
        }
    
public java.lang.ObjectwriteReplace()
Work-around for http://developer.java.sun.com/developer/bugParade/bugs/4378370.html

return
BigIntegerRep
throws
java.io.ObjectStreamException

        return new BigIntegerRep(toByteArray());