d4db64bd4ab88918f6cb44c5c8ca1d333f821bf7
[yangtools.git] / data / 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 org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue;
11
12 /**
13  * Leaf node with multiplicity 0...n. Leaf node has a value, but no child nodes in the data tree, schema for leaf node
14  * and its value is described by {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}.
15  *
16  * @param <T> Value type
17  */
18 public interface LeafSetEntryNode<T> extends ValueNode<T> {
19     @Override
20     @SuppressWarnings("rawtypes")
21     default Class<LeafSetEntryNode> contract() {
22         return LeafSetEntryNode.class;
23     }
24
25     /**
26      * {@inheritDoc}
27      *
28      * <p>
29      * <b>Implementation note</b>
30      * Invocation of {@link NodeWithValue#getValue()} on returned instance of {@link NodeWithValue} must return the
31      * same value as invocation of {@code #body()}, such as following condition is always met:
32      * {@code true == this.getIdentifier().getValue().equals(this.body())}.
33      */
34     @Override
35     NodeWithValue<T> getIdentifier();
36 }