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

PositiveInteger

public 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,...}.
author
Chris Haddad
see
XML Schema 3.3.25

Fields Summary
private BigInteger
iMinInclusive
validate 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 voidcheckValidity()

       
        if (compareTo(iMinInclusive) < 0) {
            throw new NumberFormatException(
                    Messages.getMessage("badposInt00")
                    + ":  " + 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());