2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.model.api.meta;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.eclipse.jdt.annotation.Nullable;
14 * Model specific namespace which allows access to specific
16 * {@link IdentifierNamespace} serves as common superclass for YANG model namespaces, which are type-captured
17 * subclasses. This type capture of namespace allows for handy type-safe reading methods such as
18 * {@link EffectiveStatement#get(Class, Object)} and still allows introduction of new namespaces without need to change
21 * @param <K> Identifier type
22 * @param <V> Value type
24 public interface IdentifierNamespace<K, V> {
26 * Returns value associated with supplied identifier.
28 * @param identifier Identifier of value
29 * @return value or null, if identifier is not present in namespace.
31 @Nullable V get(@NonNull K identifier);