2 * Copyright (c) 2016 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.data.api.schema;
10 import javax.annotation.Nonnull;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
14 * Interface holding the common trait of {@link LeafSetEntryNode} and {@link LeafNode}, which both hold a value.
16 * @author Robert Varga
18 * @param <K> Local identifier of node
19 * @param <V> Value of node
21 public interface ValueNode<K extends PathArgument, V> extends NormalizedNode<K, V> {
23 * Returns value of held by this node.
25 * <h3>Implementation notes</h3> Invocation of {@link #getValue()} must
26 * provides same value as value in {@link #getIdentifier()}.
27 * <code>true == this.getIdentifier().getValue().equals(this.getValue())</code>
29 * @return Returned value of this node. Value SHOULD meet criteria
34 @Nonnull V getValue();