import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
/**
- * A single node within a {@link DataTreeCandidate}. The nodes are organized
- * in tree hierarchy, reflecting the modification from which this candidate
- * was created. The node itself exposes the before- and after-image of the
- * tree restricted to the modified nodes.
+ * A single node within a {@link DataTreeCandidate}. The nodes are organized in tree hierarchy, reflecting
+ * the modification from which this candidate was created. The node itself exposes the before- and after-image
+ * of the tree restricted to the modified nodes.
*/
+// FIXME: 3.0.0: Use @NonNullByDefault
public interface DataTreeCandidateNode {
-
/**
* Get the node identifier.
*
* @param childIdentifier Identifier of child node
* @return Modified child or null if child was not modified.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
+ // FIXME: 3.0.0: return an Optional
@Nullable DataTreeCandidateNode getModifiedChild(PathArgument childIdentifier);
/**
import com.google.common.annotations.Beta;
/**
- * Tip of a data tree instance. It acts as a point to which modifications can
- * be applied.
+ * Tip of a data tree instance. It acts as a point to which modifications can be applied.
*/
+// FIXME: 3.0.0: Use @NonNullByDefault
@Beta
public interface DataTreeTip {
/**
* Validate whether a particular modification can be applied to the data tree.
- * @param modification
- * Data tree modification.
- * @throws DataValidationFailedException
- * If modification data is not valid.
+ *
+ * @param modification Data tree modification.
+ * @throws DataValidationFailedException If modification data is not valid.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
+ // FIXME: 3.0.0: document IllegalArgumentException being thrown
void validate(DataTreeModification modification) throws DataValidationFailedException;
/**
* Prepare a modification for commit.
*
- * @param modification
- * Data tree modification.
+ * @param modification Data tree modification.
* @return candidate data tree
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
+ // FIXME: 3.0.0: document IllegalArgumentException being thrown
+ // FIXME: 3.0.0: throw DataValidationFailedException or similar
DataTreeCandidateTip prepare(DataTreeModification modification);
/**
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
/**
- * A tree node which has references to its child leaves. This are typically
- * internal non-data leaves, such as containers, lists, etc.
+ * A tree node which has references to its child leaves. This are typically internal non-data leaves, such as
+ * containers, lists, etc.
*
* @param <C> Final node type
*/
+// FIXME: 3.0.0: Use @NonNullByDefault
public interface StoreTreeNode<C extends StoreTreeNode<C>> {
-
/**
* Returns a direct child of the node.
*
* @param child Identifier of child
* @return Optional with node if the child is existing, {@link Optional#empty()} otherwise.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
Optional<C> getChild(PathArgument child);
}
import org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode;
/**
- * A mutable tree node. This is a transient view materialized from a pre-existing
- * node. Modifications are isolated. Once this object is {@link #seal()}-ed,
- * any interactions with it will result in undefined behavior.
+ * A mutable tree node. This is a transient view materialized from a pre-existing node. Modifications are isolated. Once
+ * this object is {@link #seal()}ed, any interactions with it will result in undefined behavior.
*/
+// FIXME: 3.0.0: Use @NonNullByDefault
public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
/**
* Set the data component of the node.
*
* @param data New data component, may not be null.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
void setData(NormalizedNode<?, ?> data);
/**
*
* @param subtreeVersion New subtree version.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
void setSubtreeVersion(Version subtreeVersion);
/**
*
* @param child New child node.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
void addChild(TreeNode child);
/**
*
* @param id Child identificator.
*/
+ // FIXME: 3.0.0: document NullPointerException being thrown
void removeChild(PathArgument id);
/**
*/
// FIXME: BUG-2399: clarify that versioning rules are not enforced for non-presence containers, as they are not
// considered to be data nodes.
+// FIXME: 3.0.0: Use @NonNullByDefault
public interface TreeNode extends Identifiable<PathArgument>, StoreTreeNode<TreeNode> {
/**
* Get the data node version. This version is updated whenever the data representation of this particular node