BUG-1092: rename data.api.InstanceIdentifier to YangInstanceIdentifier
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / LeafSetEntryNode.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
3  * This program and the accompanying materials are made available under the
4  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5  * and is available at http://www.eclipse.org/legal/epl-v10.html
6  */
7 package org.opendaylight.yangtools.yang.data.api.schema;
8
9 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue;
11
12 /**
13  *
14  * Leaf node with multiplicity 0...n
15  *
16  * Leaf node has a value, but no child nodes in the data tree, schema
17  * for leaf node and its value is described by
18  * {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}.
19  *
20  * @param <T>
21  *            Value type
22  */
23 public interface LeafSetEntryNode<T> extends AttributesContainer, NormalizedNode<NodeWithValue, T> {
24
25     /**
26      * Returns {@link NodeWithValue} which identifies this leaf set entry.
27      *
28      * Returned {@link NodeWithValue} contains same value as this node.
29      *
30      * <h3>Implementation notes</h3> Invocation of
31      * {@link NodeWithValue#getValue()} on returned instance of
32      * {@link NodeWithValue} must returns
33      * same value as invocation of {@link #getValue()}, such as
34      * following condition is allways met:
35      * <code>true == this.getIdentifier().getValue().equals(this.getValue())</code>
36      *
37      *
38      * @return {@link NodeWithValue} which identifies this leaf set entry.
39      */
40     @Override
41     NodeWithValue getIdentifier();
42
43     /**
44      *
45      * Returns value of this leaf node
46      *
47      * <h3>Implementation notes</h3> Invocation of {@link #getValue()} must
48      * provides same value as value in {@link #getIdentifier()}.
49      * <code>true == this.getIdentifier().getValue().equals(this.getValue())</code>
50      *
51      * @return Returned value of this leaf node. Value SHOULD meet criteria
52      *         defined by schema.
53      *
54      */
55     @Override
56     public T getValue();
57 }