Class Name

  • All Implemented Interfaces:
    java.lang.Comparable<Name>

    public final class Name
    extends java.lang.Object
    implements java.lang.Comparable<Name>
    The internal representation of an XML name.

    This class keeps indicies for URI and local name for enabling faster processing.

    Names are ordered lexicographically (nsUri first, local name next.) This is the same order required by canonical XML.

    Author:
    Kohsuke Kawaguchi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean isAttribute
      Specifies if the Name is associated with an EII or AII
      java.lang.String localName
      Local name.
      short localNameIndex  
      java.lang.String nsUri
      Namespace URI.
      short nsUriIndex
      Index -1 is reserved for representing the empty namespace URI of attributes.
      short qNameIndex
      Index of the Name for an EII or AII
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(Name that)  
      boolean equals​(java.lang.String nsUri, java.lang.String localName)  
      javax.xml.namespace.QName toQName()
      Creates a QName from this.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • nsUri

        public final java.lang.String nsUri
        Namespace URI. interned.
      • localName

        public final java.lang.String localName
        Local name. interned.
      • nsUriIndex

        public final short nsUriIndex
        Index -1 is reserved for representing the empty namespace URI of attributes.
      • localNameIndex

        public final short localNameIndex
      • qNameIndex

        public final short qNameIndex
        Index of the Name for an EII or AII
      • isAttribute

        public final boolean isAttribute
        Specifies if the Name is associated with an EII or AII
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toQName

        public javax.xml.namespace.QName toQName()
        Creates a QName from this.
      • equals

        public boolean equals​(java.lang.String nsUri,
                              java.lang.String localName)
      • compareTo

        public int compareTo​(Name that)
        Specified by:
        compareTo in interface java.lang.Comparable<Name>