Rework NormalizedNode type hierarchy
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / ModificationApplyOperation.java
index 75d4ae93f0fadaf6f22ba5dc9a8b98a86b74ce50..a9a944801cc0e416662b16a66b6b40956c56ead2 100644 (file)
@@ -26,7 +26,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.spi.Version;
  * <b>Implementation notes</b>
  * <ul>
  *   <li>Implementations MUST expose all nested suboperations which operates on child nodes expose via
- *       {@link #getChild(PathArgument)} method.</li>
+ *       {@link #findChildByArg(PathArgument)} method.</li>
  *   <li>Same suboperations SHOULD be used when invoked via {@link #apply(ModifiedNode, Optional, Version)},
  *       if applicable.</li>
  *   <li>There are exactly two base implementations:
@@ -82,7 +82,7 @@ abstract class ModificationApplyOperation implements StoreTreeNode<ModificationA
      * @throws IllegalArgumentException If provided NodeModification does not adhere to the
      *         structure.
      */
-    abstract void quickVerifyStructure(NormalizedNode<?, ?> modification);
+    abstract void quickVerifyStructure(NormalizedNode modification);
 
     /**
      * Performs a full structural verification of NodeModification, such as written values / types uses right
@@ -93,7 +93,7 @@ abstract class ModificationApplyOperation implements StoreTreeNode<ModificationA
      * @throws IllegalArgumentException If provided NodeModification does not adhere to the
      *         structure.
      */
-    abstract void fullVerifyStructure(NormalizedNode<?, ?> modification);
+    abstract void fullVerifyStructure(NormalizedNode modification);
 
     /**
      * Return the tracking policy for this node's children.
@@ -111,18 +111,18 @@ abstract class ModificationApplyOperation implements StoreTreeNode<ModificationA
      * @param value Value which should be merge into the modification
      * @param version Data version as carried in the containing {@link InMemoryDataTreeModification}
      */
-    abstract void mergeIntoModifiedNode(ModifiedNode modification, NormalizedNode<?, ?> value, Version version);
+    abstract void mergeIntoModifiedNode(ModifiedNode modification, NormalizedNode value, Version version);
 
     /**
-     * Returns a suboperation for specified tree node.
+     * {@inheritDoc}
      *
-     * @return Reference to suboperation for specified tree node, {@link Optional#empty()}
-     *         if suboperation is not supported for specified tree node.
+     * @return Reference to suboperation for specified tree node, {@code null} if suboperation is not supported for
+     *         specified tree node.
      */
     @Override
-    public abstract Optional<ModificationApplyOperation> getChild(PathArgument child);
+    public abstract ModificationApplyOperation childByArg(PathArgument arg);
 
-    abstract void recursivelyVerifyStructure(NormalizedNode<?, ?> value);
+    abstract void recursivelyVerifyStructure(NormalizedNode value);
 
     abstract ToStringHelper addToStringAttributes(ToStringHelper helper);