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

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 |
XMLInt is a type converter for integer data.
Definition at line 47 of file XMLInt.java.
| 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.
| 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);
}

| 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);
}

| 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);
}

| 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);
}

| 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;
}

| int de.mfuchs.xmlstorage.XMLInt.intValue | ( | ) |
Definition at line 104 of file XMLInt.java.
References de.mfuchs.xmlstorage.XMLInt._value.
Referenced by de.mfuchs.Example3.testRead(), and de.mfuchs.XMLTest.testStreamingReader1().
{
return _value;
}
| String de.mfuchs.xmlstorage.XMLInt.toString | ( | ) |
Definition at line 109 of file XMLInt.java.
References de.mfuchs.xmlstorage.XMLInt._value.
{
return String.valueOf(_value);
}
int de.mfuchs.xmlstorage.XMLInt._value [protected] |
Definition at line 114 of file XMLInt.java.
Referenced by de.mfuchs.xmlstorage.XMLInt.intValue(), de.mfuchs.xmlstorage.XMLInt.toString(), and de.mfuchs.xmlstorage.XMLInt.XMLInt().
1.7.2