BUG-9265: Switch empty type mapping from Void to Empty
[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  *
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
7  */
8 package org.opendaylight.yangtools.yang.data.api.schema;
9
10 import javax.annotation.Nonnull;
11 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue;
13
14 /**
15  * Leaf node with multiplicity 0...n.
16  *
17  * <p>
18  * Leaf node has a value, but no child nodes in the data tree, schema
19  * for leaf node and its value is described by
20  * {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}.
21  *
22  * @param <T>
23  *            Value type
24  */
25 public interface LeafSetEntryNode<T> extends AttributesContainer, NormalizedNode<NodeWithValue, T>,
26         ValueNode<NodeWithValue, T> {
27     /**
28      * Returns {@link NodeWithValue} which identifies this leaf set entry.
29      * Returned {@link NodeWithValue} contains same value as this node.
30      *
31      * <p>
32      * <h3>Implementation notes</h3> Invocation of
33      * {@link NodeWithValue#getValue()} on returned instance of
34      * {@link NodeWithValue} must returns
35      * same value as invocation of {@link #getValue()}, such as
36      * following condition is allways met:
37      * <code>true == this.getIdentifier().getValue().equals(this.getValue())</code>
38      *
39      * @return {@link NodeWithValue} which identifies this leaf set entry.
40      */
41     @Override
42     @Nonnull NodeWithValue getIdentifier();
43 }