|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxtom.parser.Attribute
Description:this calss is a container for the
attributes in the XMl element. It only has two fields
and getter methods for them. You can not change the value
or the name of this Attribute.
Field Summary | |
private java.lang.String |
name
|
private java.lang.String |
value
|
Constructor Summary | |
private |
Attribute()
|
|
Attribute(java.lang.String name,
java.lang.String value)
Creates a new attribute. BY DEFAULT - names of the attributes are case sensitive |
Method Summary | |
java.lang.String |
getName()
|
java.lang.String |
getValue()
|
boolean |
getValueAsBoolean()
Returns value parsed as a boolean. |
byte |
getValueAsByte()
Returns value parsed as a byte. |
char |
getValueAsCharacter()
Returns value parsed as a char. |
double |
getValueAsDouble()
Returns value parsed as a double. |
float |
getValueAsFloat()
Returns value parsed as a float. |
int |
getValueAsInt()
Returns value parsed as an int. |
long |
getValueAsLong()
Returns value parsed as a float. |
short |
getValueAsShort()
Returns value parsed as a short. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String name
private java.lang.String value
Constructor Detail |
private Attribute()
public Attribute(java.lang.String name, java.lang.String value)
name
- The name of the attributevalue
- The value of this attribute.
java.lang.IllegalArgumentException
- If the name string is null or length < 1.Method Detail |
public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String toString()
Object.toString()
public int getValueAsInt()
java.lang.NumberFormatException
- is it can not parse the value.public float getValueAsFloat()
java.lang.NumberFormatException
- is it can not parse the value.public double getValueAsDouble()
java.lang.NumberFormatException
- is it can not parse the value.public short getValueAsShort()
java.lang.NumberFormatException
- is it can not parse the value.public long getValueAsLong()
java.lang.NumberFormatException
- is it can not parse the value.public byte getValueAsByte()
java.lang.NumberFormatException
- is it can not parse the value.public boolean getValueAsBoolean()
java.lang.NumberFormatException
- is it can not parse the value.Boolean.valueOf(java.lang.String)
public char getValueAsCharacter()
java.lang.NumberFormatException
- is it can not parse the value.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |