|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.elementprocessor.types.Attribute
public class Attribute
Encapsulation of a single XML element attribute in a way that shields the consumer from the data's XML origins.
Constructor Summary | |
---|---|
Attribute(String name,
String value)
Constructor |
Method Summary | |
---|---|
String |
getName()
Get the name of the Attribute. |
String |
getValue()
Get the value of the Attribute as a String. |
boolean |
getValueAsBoolean()
A convenience method to get the value of the attribute as a boolean. |
int |
getValueAsInt()
A convenience method to get the value of the Attribute as an int. |
long |
getValueAsLong()
A convenience method to get the value of the Attribute as a long. |
short |
getValueAsShort()
A convenience method to get the value of the Attribute as a short. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Attribute(String name, String value)
name
- the name of the Attribute, the left hand side of
the '=' of an XML element's attribute.value
- the value of the Attribute, the right hand side of
the '=' of an XML element's attribute.
IllegalArgumentException
- is thrown if name is null
or empty, or if value is null.Method Detail |
---|
public String getName()
public String getValue()
public int getValueAsInt()
NumberFormatException
- if the value is not an intpublic short getValueAsShort()
NumberFormatException
- if the value is not a shortpublic long getValueAsLong()
NumberFormatException
- if the value is not a longpublic boolean getValueAsBoolean()
IllegalArgumentException
- if the value does not
represent a boolean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |