X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=data%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2FLeafSetEntryNode.java;fp=data%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2FLeafSetEntryNode.java;h=d4db64bd4ab88918f6cb44c5c8ca1d333f821bf7;hb=9728fe497bcb7349f7e6ef9d3d984202d7ac07e7;hp=0000000000000000000000000000000000000000;hpb=6fbe90e71812236b6d8dee506c421b37605e5797;p=yangtools.git diff --git a/data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java b/data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java new file mode 100644 index 0000000000..d4db64bd4a --- /dev/null +++ b/data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.yangtools.yang.data.api.schema; + +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue; + +/** + * Leaf node with multiplicity 0...n. Leaf node has a value, but no child nodes in the data tree, schema for leaf node + * and its value is described by {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}. + * + * @param Value type + */ +public interface LeafSetEntryNode extends ValueNode { + @Override + @SuppressWarnings("rawtypes") + default Class contract() { + return LeafSetEntryNode.class; + } + + /** + * {@inheritDoc} + * + *

+ * Implementation note + * Invocation of {@link NodeWithValue#getValue()} on returned instance of {@link NodeWithValue} must return the + * same value as invocation of {@code #body()}, such as following condition is always met: + * {@code true == this.getIdentifier().getValue().equals(this.body())}. + */ + @Override + NodeWithValue getIdentifier(); +}