Class AbstractQName

java.lang.Object
org.opendaylight.yangtools.yang.common.AbstractQName
All Implemented Interfaces:
Serializable, Identifier, Immutable, WritableObject
Direct Known Subclasses:
QName, UnresolvedQName

@NonNullByDefault public abstract sealed class AbstractQName extends Object implements Identifier, WritableObject permits QName, UnresolvedQName
Abstract superclass for sharing QName references, which can either be resolved QNames or unresolved UnresolvedQName.Unqualified and UnresolvedQName.Qualifieds.
See Also:
  • Method Details

    • getLocalName

      public final String getLocalName()
      Returns YANG schema identifier which were defined for this node in the YANG module.
      Returns:
      YANG schema identifier which were defined for this node in the YANG module
    • intern

      public abstract AbstractQName intern()
      Return an interned reference to an equivalent object.
      Returns:
      Interned reference, or this object if it was interned.
    • hashCode

      public abstract int hashCode()
      Specified by:
      hashCode in interface Identifier
      Overrides:
      hashCode in class Object
    • equals

      public abstract boolean equals(@Nullable Object obj)
      Specified by:
      equals in interface Identifier
      Overrides:
      equals in class Object
    • toString

      public abstract String toString()
      Specified by:
      toString in interface Identifier
      Overrides:
      toString in class Object
    • bindTo

      public QName bindTo(QNameModule namespace)
      Returns a QName with the specified namespace and the same local name as this one.
      Parameters:
      namespace - New namespace to use
      Returns:
      a QName with specified QNameModule and same local name as this one
      Throws:
      NullPointerException - if namespace is null
    • unbind

      public UnresolvedQName.Unqualified unbind()
      Returns an UnresolvedQName.Unqualified identifier formed by capturing getLocalName().
      Returns:
      An unqualified UnresolvedQName