Class BiMapYangNamespaceContext
java.lang.Object
org.opendaylight.yangtools.yang.common.BiMapYangNamespaceContext
- All Implemented Interfaces:
Serializable
,Immutable
,WritableObject
,YangNamespaceContext
public final class BiMapYangNamespaceContext
extends Object
implements YangNamespaceContext, WritableObject
A BiMap-based implementation of
YangNamespaceContext
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
namespaceForPrefix
(String prefix) Return QNameModule to which a particular prefix is bound.prefixForNamespace
(QNameModule namespace) Return a prefix to which a particular QNameModule is bound.static BiMapYangNamespaceContext
toString()
void
writeTo
(DataOutput out) Serialize this object into aDataOutput
as a fixed-format stream.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.yang.common.YangNamespaceContext
createQName, findNamespaceForPrefix, findPrefixForNamespace
-
Constructor Details
-
BiMapYangNamespaceContext
-
-
Method Details
-
namespaceForPrefix
Description copied from interface:YangNamespaceContext
Return QNameModule to which a particular prefix is bound.- Specified by:
namespaceForPrefix
in interfaceYangNamespaceContext
- Parameters:
prefix
- Prefix to look up- Returns:
- QNameModule bound to specified prefix, or
null
-
prefixForNamespace
Description copied from interface:YangNamespaceContext
Return a prefix to which a particular QNameModule is bound. If a namespace is bound to multiple prefixes, it is left unspecified which of those prefixes is returned.- Specified by:
prefixForNamespace
in interfaceYangNamespaceContext
- Parameters:
namespace
- QNameModule to look up- Returns:
- Prefix to which the QNameModule is bound, or
null
-
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
-
readFrom
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-