Package org.apache.pivot.xml
Class Element.NamespaceDictionary
- java.lang.Object
-
- org.apache.pivot.xml.Element.NamespaceDictionary
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
,Dictionary<java.lang.String,java.lang.String>
- Enclosing class:
- Element
public final class Element.NamespaceDictionary extends java.lang.Object implements Dictionary<java.lang.String,java.lang.String>, java.lang.Iterable<java.lang.String>
Dictionary representing the namespaces 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 prefix)
Tests for the existence of a namespace declared by this element.java.lang.String
get(java.lang.String prefix)
Returns the URI of a namespace declared by this element.java.util.Iterator<java.lang.String>
iterator()
Returns an iterator over the element's namespace prefixes.java.lang.String
put(java.lang.String prefix, java.lang.String uri)
Sets the URI of a namespace declared by this element.java.lang.String
remove(java.lang.String prefix)
Removes a namespace from this element's declared namespaces.-
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 prefix)
Returns the URI of a namespace declared by this element.- Specified by:
get
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
prefix
- The namespace prefix.- Returns:
- The declared namespace, or
null
if no such namespace exists.
-
put
public java.lang.String put(java.lang.String prefix, java.lang.String uri)
Sets the URI of a namespace declared by this element.- Specified by:
put
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
prefix
- The namespace prefix.uri
- The namespace URI.- Returns:
- The URI previously associated with the given prefix.
-
remove
public java.lang.String remove(java.lang.String prefix)
Removes a namespace from this element's declared namespaces.- Specified by:
remove
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
prefix
- The namespace prefix.- Returns:
- The URI previously associated with the given prefix.
-
containsKey
public boolean containsKey(java.lang.String prefix)
Tests for the existence of a namespace declared by this element.- Specified by:
containsKey
in interfaceDictionary<java.lang.String,java.lang.String>
- Parameters:
prefix
- Namespace prefix to test for.- Returns:
true
if this element declares a namespace with the given prefix;false
otherwise.
-
iterator
public java.util.Iterator<java.lang.String> iterator()
Returns an iterator over the element's namespace prefixes.- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.String>
-
-