Package org.apache.pivot.xml
Class Element.ElementDictionary
- java.lang.Object
-
- org.apache.pivot.xml.Element.ElementDictionary
-
- All Implemented Interfaces:
Dictionary<java.lang.String,java.lang.String>
- Enclosing class:
- Element
public final class Element.ElementDictionary extends java.lang.Object implements Dictionary<java.lang.String,java.lang.String>
Dictionary representing the attributes declared by this element.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Dictionary
Dictionary.Pair<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.String attributeName)
Tests for the existence of an attribute.java.lang.String
get(java.lang.String attributeName)
Returns an attribute value.java.lang.String
put(java.lang.String attributeName, java.lang.String value)
Sets an attribute value.java.lang.String
remove(java.lang.String attributeName)
Removes an attribute.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.collections.Dictionary
containsAny, copy, getBoolean, getBoolean, getColor, getFirst, getFont, getInt, getInt, getString, getString, putAll
-
-
-
-
Method Detail
-
get
public java.lang.String get(java.lang.String attributeName)
Returns an attribute value.- Specified by:
get
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
attributeName
- Name of the attribute whose value we are interested in.- Returns:
- The value associated with the given attribute, or
null
-
put
public java.lang.String put(java.lang.String attributeName, java.lang.String value)
Sets an attribute value.- Specified by:
put
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
attributeName
- The attribute to set the new value for.value
- New value for this attribute.- Returns:
- The value previously associated with the given attribute, or
null
if the attribute did not previously exist.
-
remove
public java.lang.String remove(java.lang.String attributeName)
Removes an attribute.- Specified by:
remove
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
attributeName
- Name of the attribute to remove.- Returns:
- The value previously associated with the given attribute,
or
null
if the attribute did not exist.
-
containsKey
public boolean containsKey(java.lang.String attributeName)
Tests for the existence of an attribute.- Specified by:
containsKey
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
attributeName
- Name of the attribute to test for.- Returns:
true
if this element defines the given attribute;false
otherwise.
-
-