public class Element extends java.lang.Object implements IAttributes
Element is the default element.| Modifier and Type | Field and Description |
|---|---|
protected Attributes |
attributes
The local attributes of this element.
|
protected java.lang.String |
id
The unique id.
|
protected Element |
parent
The parent element.
|
static java.lang.String |
TYPE
The identifier for the type of an element.
|
| Constructor and Description |
|---|
Element(Element parent)
Constructs a new
Element from a parent, i.e., a copy with local
attributes. |
Element(java.lang.String id)
Constructs a new
Element. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
<O> O |
getAttribute(java.lang.String identifier)
Returns the attribute
|
java.util.Set<java.lang.String> |
getAttributeNames()
Returns the attribute names.
|
Parameter |
getAttributeParameter(java.lang.String identifier)
Return the parameter definition or
null if the attribute is not
defined as parameter. |
Attributes |
getAttributes()
Returns the map of all pairs of attributes.
|
java.lang.String |
getId()
Returns the id.
|
java.util.Set<java.lang.String> |
getLocalAttributeNames()
Returns the local attribute names.
|
Attributes |
getLocalAttributes()
Returns the local attributes.
|
Element |
getParent()
Returns the parent element.
|
java.lang.String |
getType()
Returns the type of the element.
|
int |
hashCode() |
boolean |
isDefined(java.lang.String identifier)
Tests whether an attribute is defined.
|
void |
setAttribute(java.lang.String identifier,
java.lang.Object object)
Sets the attribute.
|
void |
setParent(Element element)
Sets the parent element.
|
void |
setType(java.lang.String type)
Sets the type of the element.
|
java.lang.String |
toString() |
public static java.lang.String TYPE
protected final Attributes attributes
protected Element parent
protected java.lang.String id
public Element(java.lang.String id)
Element.id - the idpublic Element(Element parent)
Element from a parent, i.e., a copy with local
attributes.parent - the parentpublic java.lang.String getId()
public Element getParent()
public void setParent(Element element)
element - the parentpublic <O> O getAttribute(java.lang.String identifier)
IAttributesgetAttribute in interface IAttributesO - the type of the attributeidentifier - the identifier of the attributepublic boolean isDefined(java.lang.String identifier)
IAttributesisDefined in interface IAttributesidentifier - the identifier of the attributetrue if definedpublic Attributes getAttributes()
IAttributesgetAttributes in interface IAttributespublic Attributes getLocalAttributes()
public java.util.Set<java.lang.String> getLocalAttributeNames()
public void setAttribute(java.lang.String identifier,
java.lang.Object object)
IAttributessetAttribute in interface IAttributesidentifier - the identifier of the attributeobject - the value of the attributepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic Parameter getAttributeParameter(java.lang.String identifier)
IAttributesnull if the attribute is not
defined as parameter.getAttributeParameter in interface IAttributesidentifier - the identifier of the attributepublic java.util.Set<java.lang.String> getAttributeNames()
IAttributesgetAttributeNames in interface IAttributespublic java.lang.String getType()
public void setType(java.lang.String type)
type - the type of the element