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%2FDataTreeSnapshotCursor.java;h=36bd4531c3d25426d45213e6f09210f2e28ab221;hb=970923b5f47f7507ec78021965fa5df1a878af48;hp=a2ebb4fa872e5c22d5e65a997557ad8aac8a663d;hpb=12003fdee334d232c43771bfdec163b48469ebeb;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshotCursor.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshotCursor.java index a2ebb4fa87..36bd4531c3 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshotCursor.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshotCursor.java @@ -8,16 +8,15 @@ package org.opendaylight.yangtools.yang.data.api.schema.tree; import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import javax.annotation.Nonnull; +import java.util.Optional; +import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer; /** - * A cursor holding a logical position within a {@link DataTreeSnapshot}. It allows - * operations relative to that position, as well as moving the position up or down - * the tree. + * A cursor holding a logical position within a {@link DataTreeSnapshot}. It allows operations relative to that + * position, as well as moving the position up or down the tree. Implementations are expected to be NOT thread-safe. */ @Beta public interface DataTreeSnapshotCursor extends AutoCloseable { @@ -25,27 +24,27 @@ public interface DataTreeSnapshotCursor extends AutoCloseable { * Move the cursor to the specified child of the current position. * * @param child Child identifier - * @throws BackendFailedException when implementation-specific errors occurs + * @throws BackendFailedException when an implementation-specific error occurs * while servicing the request. * @throws IllegalArgumentException when specified identifier does not identify * a valid child, or if that child is not an * instance of {@link NormalizedNodeContainer}. */ - void enter(@Nonnull PathArgument child); + void enter(@NonNull PathArgument child); /** * Move the cursor to the specified child of the current position. This is * the equivalent of multiple invocations of {@link #enter(PathArgument)}, - * except the operation is performed atomically. + * except the operation is performed all at once. * * @param path Nested child identifier - * @throws BackendFailedException when implementation-specific errors occurs + * @throws BackendFailedException when an implementation-specific error occurs * while servicing the request. * @throws IllegalArgumentException when specified path does not identify * a valid child, or if that child is not an * instance of {@link NormalizedNodeContainer}. */ - void enter(@Nonnull PathArgument... path); + void enter(@NonNull PathArgument... path); /** * Move the cursor to the specified child of the current position. This is @@ -53,13 +52,13 @@ public interface DataTreeSnapshotCursor extends AutoCloseable { * argument. * * @param path Nested child identifier - * @throws BackendFailedException when implementation-specific errors occurs + * @throws BackendFailedException when an implementation-specific error occurs * while servicing the request. * @throws IllegalArgumentException when specified path does not identify * a valid child, or if that child is not an * instance of {@link NormalizedNodeContainer}. */ - void enter(@Nonnull Iterable path); + void enter(@NonNull Iterable path); /** * Move the cursor up to the parent of current position. This is equivalent of @@ -93,7 +92,7 @@ public interface DataTreeSnapshotCursor extends AutoCloseable { * servicing the request. * @throws IllegalArgumentException when specified path does not identify a valid child. */ - Optional> readNode(@Nonnull PathArgument child); + Optional readNode(@NonNull PathArgument child); /** * Close this cursor. Attempting any further operations on the cursor will lead