Class UnresolvedQName.Unqualified
java.lang.Object
org.opendaylight.yangtools.yang.common.AbstractQName
org.opendaylight.yangtools.yang.common.UnresolvedQName
org.opendaylight.yangtools.yang.common.UnresolvedQName.Unqualified
- All Implemented Interfaces:
Serializable
,Comparable<UnresolvedQName.Unqualified>
,Identifier
,Immutable
,WritableObject
- Enclosing class:
- UnresolvedQName
public static final class UnresolvedQName.Unqualified
extends UnresolvedQName
implements Comparable<UnresolvedQName.Unqualified>
An unresolved, unqualified
QName
. It is guaranteed to hold a valid AbstractQName.getLocalName()
, in the
default namespace, which is not resolved. A resolved QName
can be constructed through
AbstractQName.bindTo(QNameModule)
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.common.UnresolvedQName
UnresolvedQName.Qualified, UnresolvedQName.Unqualified
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
@Nullable String
Return the prefix of this unresolved QName.int
hashCode()
intern()
Return an interned reference to an equivalent object.static UnresolvedQName.Unqualified
Create a new unqualified unresolved QName.static UnresolvedQName.Unqualified
Read an UnqualifiedQName from a DataInput.toString()
unbind()
Returns anUnresolvedQName.Unqualified
identifier formed by capturingAbstractQName.getLocalName()
.withPrefix
(String newPrefix) Return aUnresolvedQName.Qualified
object bound to specifiedprefix
.void
writeTo
(DataOutput out) Serialize this object into aDataOutput
as a fixed-format stream.Methods inherited from class org.opendaylight.yangtools.yang.common.UnresolvedQName
tryLocalName
Methods inherited from class org.opendaylight.yangtools.yang.common.AbstractQName
bindTo, getLocalName
-
Method Details
-
of
Create a new unqualified unresolved QName.- Parameters:
localName
- The local name of this unqualified QName- Returns:
- An UnqualifiedQName instance
- Throws:
NullPointerException
- if localName isnull
IllegalArgumentException
- iflocalName
is not a valid YANG identifier
-
readFrom
Read an UnqualifiedQName from a DataInput. The format is expected to match the output format ofwriteTo(DataOutput)
.- Parameters:
in
- DataInput to read- Returns:
- An UnqualifiedQName instance
- Throws:
IOException
- if I/O error occurs
-
unbind
Description copied from class:AbstractQName
Returns anUnresolvedQName.Unqualified
identifier formed by capturingAbstractQName.getLocalName()
.- Overrides:
unbind
in classAbstractQName
- Returns:
- An unqualified
UnresolvedQName
-
intern
Description copied from class:AbstractQName
Return an interned reference to an equivalent object.- Specified by:
intern
in classUnresolvedQName
- Returns:
- Interned reference, or this object if it was interned.
-
getPrefix
Description copied from class:UnresolvedQName
Return the prefix of this unresolved QName.- Specified by:
getPrefix
in classUnresolvedQName
- Returns:
- This QName's prefix
-
withPrefix
Description copied from class:UnresolvedQName
Return aUnresolvedQName.Qualified
object bound to specifiedprefix
.- Specified by:
withPrefix
in classUnresolvedQName
- Returns:
- a
UnresolvedQName.Qualified
object bound to specifiedprefix
-
compareTo
- Specified by:
compareTo
in interfaceComparable<UnresolvedQName.Unqualified>
-
writeTo
Description copied from interface:WritableObject
Serialize this object into aDataOutput
as a fixed-format stream.- Specified by:
writeTo
in interfaceWritableObject
- Parameters:
out
- Data output- Throws:
IOException
- if an I/O error occurs
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceIdentifier
- Specified by:
hashCode
in classAbstractQName
-
equals
- Specified by:
equals
in interfaceIdentifier
- Specified by:
equals
in classAbstractQName
-
toString
- Specified by:
toString
in interfaceIdentifier
- Specified by:
toString
in classAbstractQName
-