X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2Ftree%2FDataTreeCandidateNode.java;h=4a8ced9be79421fcc04fa63418336f3cd82aa2c1;hb=refs%2Fchanges%2F81%2F14281%2F2;hp=76f3f563cd8596544121258c8e390a6820501fc3;hpb=5d50486aed75e0b94a06952add2cc5d9a62ba053;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeCandidateNode.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeCandidateNode.java index 76f3f563cd..4a8ced9be7 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeCandidateNode.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeCandidateNode.java @@ -7,11 +7,12 @@ */ package org.opendaylight.yangtools.yang.data.api.schema.tree; +import com.google.common.base.Optional; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import com.google.common.base.Optional; - /** * A single node within a {@link DataTreeCandidate}. The nodes are organized * in tree hierarchy, reflecting the modification from which this candidate @@ -19,26 +20,36 @@ import com.google.common.base.Optional; * tree restricted to the modified nodes. */ public interface DataTreeCandidateNode { + /** * Get the node identifier. * * @return The node identifier. */ - PathArgument getIdentifier(); + @Nonnull PathArgument getIdentifier(); /** * Get an unmodifiable iterable of modified child nodes. * * @return Unmodifiable iterable of modified child nodes. */ - Iterable getChildNodes(); + @Nonnull Iterable getChildNodes(); + + /** + * Returns modified child or null if child was not modified + * / does not exists. + * + * @param identifier Identifier of child node + * @return Modified child or null if child was not modified. + */ + @Nullable DataTreeCandidateNode getModifiedChild(PathArgument identifier); /** * Return the type of modification this node is undergoing. * * @return Node modification type. */ - ModificationType getModificationType(); + @Nonnull ModificationType getModificationType(); /** * Return the before-image of data corresponding to the node.