public final class Namespace extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static Namespace | ROOT_NAMESPACEThe root namespace. | 
| static char | SEPARATORThe separator between the hierachical parts of a namespace. | 
| Constructor and Description | 
|---|
| Namespace(List<String> namespaceParts)Creates a namespace from a hierarchical List of namespace parts. | 
| Namespace(Namespace toCopy)Copy-Contructor. | 
| Namespace(String namespace)Constructs a namespace from its string representation. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o)Returns if this object is equal to another object. | 
| Namespace | getParent()Returns the parent of the given namespace. | 
| List<String> | getParts()Returns the parts of the namespace in hierachical order. | 
| int | hashCode()Returns a hash code for this namespace. | 
| boolean | isRoot()Returns whether this namespace is the root namespace. | 
| boolean | isVisibleFrom(Namespace otherNamespace)Returns if this namespace is visible from another namespace. | 
| boolean | isVisibleTo(Namespace otherNamespace)Returns if this namespace is visible to another namespace. | 
| String | toString()Returns a String representation of this namespace. | 
public static final char SEPARATOR
public static final Namespace ROOT_NAMESPACE
public Namespace(String namespace)
namespace - teh string representation of the namespace.
        May not be null, and may not contain colons(:).NullPointerException - if namespace is null.IllegalArgumentException - if namespace contains colons.public Namespace(Namespace toCopy)
toCopy - the namespace to copy, not null.NullPointerException - if toCopy is null.public List<String> getParts()
public Namespace getParent()
public boolean isVisibleTo(Namespace otherNamespace)
otherNamespace - the namespace against this namespace
        should be checked, not null.NullPointerException - if otherNamespace is null.public boolean isVisibleFrom(Namespace otherNamespace)
otherNamespace - the namespace against this namespace
        should be checked, not null.NullPointerException - if otherNamespace is null.public boolean isRoot()
public boolean equals(Object o)
equals in class Objecto - the object to check equality.Object.equals(Object)public int hashCode()
equals().hashCode in class ObjectObject.hashCode()public String toString()
toString in class ObjectObject.toString()Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.