Public Member Functions | Protected Attributes

de.mfuchs.xmlstorage.XMLInt Class Reference

XMLInt is a type converter for integer data. More...

Collaboration diagram for de.mfuchs.xmlstorage.XMLInt:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLInt (int value)
 XMLInt (final String value)
 XMLInt (final String value, int def)
 XMLInt (final AbstractXMLNode node, final String attrName)
 XMLInt (final XMLPos pos, final String attrName)
 XMLInt (final XMLPos pos, final String attrName, int def)
 XMLInt (final XMLStreamReader reader, final String attrName)
 XMLInt (final XMLStreamReader reader, final String attrName, int def)
 XMLInt (final AbstractXMLNode node, final String attrName, int def)
int intValue ()
String toString ()

Protected Attributes

int _value

Detailed Description

XMLInt is a type converter for integer data.

Definition at line 47 of file XMLInt.java.


Constructor & Destructor Documentation

de.mfuchs.xmlstorage.XMLInt.XMLInt ( int  value )

Definition at line 49 of file XMLInt.java.

References de.mfuchs.xmlstorage.XMLInt._value.

    {
        _value = value;
    }
de.mfuchs.xmlstorage.XMLInt.XMLInt ( final String  value )

Definition at line 54 of file XMLInt.java.

    {
        this(value, 0);
    }
de.mfuchs.xmlstorage.XMLInt.XMLInt ( final String  value,
int  def 
)

Definition at line 59 of file XMLInt.java.

References de.mfuchs.xmlstorage.XMLInt._value.

    {
        if (value!=null && value.length()>0)
            _value = Integer.parseInt(value);
        else
            _value = def;
    }
de.mfuchs.xmlstorage.XMLInt.XMLInt ( final AbstractXMLNode  node,
final String  attrName 
)

Definition at line 68 of file XMLInt.java.

    {
        this(node, attrName, 0);
    }
de.mfuchs.xmlstorage.XMLInt.XMLInt ( final XMLPos  pos,
final String  attrName 
)

Definition at line 73 of file XMLInt.java.

References de.mfuchs.xmlstorage.XMLPos.cur().

    {
        this(pos.cur(), attrName, 0);
    }

Here is the call graph for this function:

de.mfuchs.xmlstorage.XMLInt.XMLInt ( final XMLPos  pos,
final String  attrName,
int  def 
)

Definition at line 78 of file XMLInt.java.

References de.mfuchs.xmlstorage.XMLPos.cur().

    {
        this(pos.cur(), attrName, def);
    }

Here is the call graph for this function:

de.mfuchs.xmlstorage.XMLInt.XMLInt ( final XMLStreamReader  reader,
final String  attrName 
)

Definition at line 83 of file XMLInt.java.

References de.mfuchs.xmlstorage.stream.XMLStreamReader.getNode().

    {
        this(reader.getNode(), attrName, 0);
    }

Here is the call graph for this function:

de.mfuchs.xmlstorage.XMLInt.XMLInt ( final XMLStreamReader  reader,
final String  attrName,
int  def 
)

Definition at line 88 of file XMLInt.java.

References de.mfuchs.xmlstorage.stream.XMLStreamReader.getNode().

    {
        this(reader.getNode(), attrName, def);
    }

Here is the call graph for this function:

de.mfuchs.xmlstorage.XMLInt.XMLInt ( final AbstractXMLNode  node,
final String  attrName,
int  def 
)

Definition at line 93 of file XMLInt.java.

References de.mfuchs.xmlstorage.XMLInt._value, and de.mfuchs.xmlstorage.AbstractXMLNode.get().

    {
        final String value = node.get(attrName);

        if (value.length() > 0)
            _value = Integer.parseInt(value);
        else
            _value = def;
    }

Here is the call graph for this function:


Member Function Documentation

int de.mfuchs.xmlstorage.XMLInt.intValue (  )
String de.mfuchs.xmlstorage.XMLInt.toString (  )

Definition at line 109 of file XMLInt.java.

References de.mfuchs.xmlstorage.XMLInt._value.

    {
        return String.valueOf(_value);
    }

Member Data Documentation


The documentation for this class was generated from the following file: