public class PrefixMap extends Object implements Cloneable
MutablePrefixMap
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,Set<String>> |
namespaceToPrefixMap |
protected HashSet<String> |
prefixes |
Modifier and Type | Method and Description |
---|---|
PrefixMap |
clone() |
boolean |
containsNamespace(String namespace)
Checks whether the map contains a reference to the given namespace.
|
boolean |
containsPrefix(String prefix)
Returns true if the given prefix exists somewhere in this map
|
boolean |
equals(Object obj) |
String[] |
getAllNamespaces()
Returns all the namespace URIs known to this map
|
String[] |
getAllPrefixes()
Returns all the prefixes known to this map.
|
String |
getNamespaceForPrefix(String prefix)
Returns the namespace for the given prefix.
|
String[] |
getPrefixesForNamespace(String uri)
Returns the prefix that is used to reference the given namespace URI.
|
MutablePrefixMap |
toMutable()
Creates a mutable copy of this PrefixMap, based on its values
|
public PrefixMap()
public PrefixMap(PrefixMap map)
public MutablePrefixMap toMutable()
public String getNamespaceForPrefix(String prefix)
prefix
- the prefix to find out namespace forpublic boolean containsPrefix(String prefix)
prefix
- A namespace prefix string such as "fx"
.public boolean containsNamespace(String namespace)
namespace
- URI of a namespace.public String[] getAllPrefixes()
public String[] getAllNamespaces()
public String[] getPrefixesForNamespace(String uri)
uri
- A namespace URI such as "http://ns.adobe.com/mxml/2009"
.Copyright © 2016 The Apache Software Foundation. All rights reserved.