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 booleancontainsKey(java.lang.String attributeName)Tests for the existence of an attribute.java.lang.Stringget(java.lang.String attributeName)Returns an attribute value.java.lang.Stringput(java.lang.String attributeName, java.lang.String value)Sets an attribute value.java.lang.Stringremove(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:
getin 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:
putin 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
nullif the attribute did not previously exist.
-
remove
public java.lang.String remove(java.lang.String attributeName)
Removes an attribute.- Specified by:
removein 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
nullif the attribute did not exist.
-
containsKey
public boolean containsKey(java.lang.String attributeName)
Tests for the existence of an attribute.- Specified by:
containsKeyin interfaceDictionary<java.lang.String,java.lang.String>- Parameters:
attributeName- Name of the attribute to test for.- Returns:
trueif this element defines the given attribute;falseotherwise.
-
-