X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=yang%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2FLeafSetEntryNode.java;h=db5b848f562b2af3f20c3f55d3f05f37c97ae258;hb=12003fdee334d232c43771bfdec163b48469ebeb;hp=3209b5eed5a3f810d9c44965448f6e007bb0e570;hpb=a3dec43333e3b5006b6191cc07128b72d182dcea;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java index 3209b5eed5..db5b848f56 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java @@ -1,17 +1,57 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * + * 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.InstanceIdentifier.NodeWithValue; +import org.opendaylight.yangtools.yang.data.api.AttributesContainer; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue; -public interface LeafSetEntryNode extends NormalizedNode { +/** + * + * 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 AttributesContainer, NormalizedNode { + /** + * Returns {@link NodeWithValue} which identifies this leaf set entry. + * + * Returned {@link NodeWithValue} contains same value as this node. + * + *

Implementation notes

Invocation of + * {@link NodeWithValue#getValue()} on returned instance of + * {@link NodeWithValue} must returns + * same value as invocation of {@link #getValue()}, such as + * following condition is allways met: + * true == this.getIdentifier().getValue().equals(this.getValue()) + * + * + * @return {@link NodeWithValue} which identifies this leaf set entry. + */ @Override - public NodeWithValue getIdentifier(); + NodeWithValue getIdentifier(); + /** + * + * Returns value of this leaf node + * + *

Implementation notes

Invocation of {@link #getValue()} must + * provides same value as value in {@link #getIdentifier()}. + * true == this.getIdentifier().getValue().equals(this.getValue()) + * + * @return Returned value of this leaf node. Value SHOULD meet criteria + * defined by schema. + * + */ + @Override + T getValue(); }