public Attribute(String name,
String value) {
if ((name == null) || (name.length() == 0))
{
throw new IllegalArgumentException(
"Attribute name is null or empty");
}
if (value == null)
{
throw new IllegalArgumentException("Attribute value is null");
}
_name = name;
_value = value;
}
Parameters:
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.
Throws:
IllegalArgumentException - is thrown if name is null
or empty, or if value is null.
- exception:
IllegalArgumentException - is thrown if name is null
or empty, or if value is null.
|