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
ConstructorsConstructorDescriptionBiMapYangNamespaceContext(com.google.common.collect.BiMap<String, QNameModule> mapping) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()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 BiMapYangNamespaceContexttoString()voidwriteTo(DataOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opendaylight.yangtools.yang.common.YangNamespaceContext
createQName, findNamespaceForPrefix, findPrefixForNamespace
-
Constructor Details
-
BiMapYangNamespaceContext
-
-
Method Details
-
namespaceForPrefix
Description copied from interface:YangNamespaceContextReturn QNameModule to which a particular prefix is bound.- Specified by:
namespaceForPrefixin interfaceYangNamespaceContext- Parameters:
prefix- Prefix to look up- Returns:
- QNameModule bound to specified prefix, or
null
-
prefixForNamespace
Description copied from interface:YangNamespaceContextReturn 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:
prefixForNamespacein interfaceYangNamespaceContext- Parameters:
namespace- QNameModule to look up- Returns:
- Prefix to which the QNameModule is bound, or
null
-
writeTo
- Specified by:
writeToin interfaceWritableObject- Throws:
IOException
-
readFrom
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-