SASAX API - 1.5

jp.ne.dti.lares.foozy.sasax
Class ByteElement

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.sasax.AbstractElement
        |
        +--jp.ne.dti.lares.foozy.sasax.ValueElement
              |
              +--jp.ne.dti.lares.foozy.sasax.NumberElement
                    |
                    +--jp.ne.dti.lares.foozy.sasax.ByteElement
All Implemented Interfaces:
Element

public class ByteElement
extends NumberElement

Concrete class to treat text as byte value.

You should not add validations which return other than java.lang.Byte.

Author:
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>(code/doc)

Inner Class Summary
static class ByteElement.CustomValidation
          Implementation to validate byte value string representation in XML document.
 
Inner classes inherited from class jp.ne.dti.lares.foozy.sasax.NumberElement
NumberElement.CustomValidation
 
Constructor Summary
ByteElement(Element parent, java.lang.String uri, java.lang.String lName)
          Constructor.
ByteElement(Element parent, java.lang.String uri, java.lang.String lName, int radix)
          Constructor.
 
Method Summary
 java.lang.Byte getByte(boolean ensure)
          Get value of element.
 
Methods inherited from class jp.ne.dti.lares.foozy.sasax.NumberElement
getNumber, setRadix
 
Methods inherited from class jp.ne.dti.lares.foozy.sasax.ValueElement
accepts, addValidation, characters, endElement, examine, getDelayed, getIgnoreEmpty, getLName, getURI, getValue, ignorableWhitespace, isNil, isNillable, setDelayed, setIgnoreEmpty, setNillable, startElement, validate
 
Methods inherited from class jp.ne.dti.lares.foozy.sasax.AbstractElement
addCleanup, addNotification, clear, ensureDetermined, fireElementStarted, getAttribute, getParent, hasNotification, hasXSINil, isDetermined, notifyDetermined, notifyDetermined, processingInstruction, removeNotification, setDetermined, skippedEntity, unwatchAttribute, watchAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteElement

public ByteElement(Element parent,
                   java.lang.String uri,
                   java.lang.String lName)
Constructor.

This is equivalent to ByteElement(parent, uri, lName, 10).

Parameters:
parent - of this element.
uri - of namespace.
lName - of this element.

ByteElement

public ByteElement(Element parent,
                   java.lang.String uri,
                   java.lang.String lName,
                   int radix)
Constructor.
Parameters:
parent - of this element.
uri - of namespace.
lName - of this element.
radix - in whcih determined text value is converted.
Method Detail

getByte

public final java.lang.Byte getByte(boolean ensure)
Get value of element.

This is equivalent to ValueElement#getValue(ensure) except of down casting.

Parameters:
ensure - whether determination should be ensured or not.
Returns:
value specified in XML document.
See Also:
AbstractElement.ensureDetermined()

SASAX API - 1.5