uxparser
Class XNs

java.lang.Object
  extended by uxparser.XNs

public final class XNs
extends java.lang.Object

XNs models an XML namespace. XNs are usually created as attributes on XElems using the XElem.defineNs() and XElem.defineDefaultNs() methods. Two XNs instances are equal if they have the same uri.


Constructor Summary
XNs(java.lang.String prefix, java.lang.String uri)
          Create a new XNs instance with the specified prefix and uri.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two instances of XNs are equal if they have the exact same uri characters.
 boolean isDefault()
          Return if this a default XNs namespace which has a prefix of "".
 java.lang.String prefix()
          Get the prefix used to tag elements with this namespace.
 java.lang.String toString()
          Return uri.
 java.lang.String uri()
          Get the uri which defines a universally unique namespace.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XNs

public XNs(java.lang.String prefix,
           java.lang.String uri)
Create a new XNs instance with the specified prefix and uri.

Method Detail

isDefault

public boolean isDefault()
Return if this a default XNs namespace which has a prefix of "".


prefix

public final java.lang.String prefix()
Get the prefix used to tag elements with this namespace. If this is the default namespace then return "".


uri

public final java.lang.String uri()
Get the uri which defines a universally unique namespace.


toString

public java.lang.String toString()
Return uri.

Overrides:
toString in class java.lang.Object

equals

public final boolean equals(java.lang.Object obj)
Two instances of XNs are equal if they have the exact same uri characters.

Overrides:
equals in class java.lang.Object