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

UnsignedShort

public class UnsignedShort extends UnsignedInt
Custom class for supporting primitive XSD data type UnsignedShort
author
Chris Haddad
see
XML Schema 3.3.23

Fields Summary
Constructors Summary
public UnsignedShort()


    
public UnsignedShort(long sValue)
ctor for UnsignedShort

exception
NumberFormatException will be thrown if validation fails

      setValue(sValue);
    
public UnsignedShort(String sValue)

      setValue(Long.parseLong(sValue));
    
Methods Summary
public static booleanisValid(long sValue)
validate the value against the xsd definition

      if ( (sValue < 0L  ) || (sValue > 65535L) )
        return false;
      else
        return true;
    
public voidsetValue(long sValue)
validates the data and sets the value for the object.

param
sValue value

        if (UnsignedShort.isValid(sValue) == false)
            throw new NumberFormatException(
                Messages.getMessage("badUnsignedShort00") +
                    String.valueOf(sValue) + "]");
        lValue = new Long(sValue);