*/
package org.opendaylight.yangtools.yang.data.impl.schema.tree;
-
-import com.google.common.base.Optional;
+import java.util.Collection;
+import java.util.Optional;
import org.opendaylight.yangtools.concepts.Identifiable;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.tree.spi.TreeNode;
/**
* It is used by the validation code to allow for a read-only view of the
* modification tree as we should never modify that during validation.
*/
-interface NodeModification extends Identifiable<PathArgument> {
+abstract class NodeModification implements Identifiable<PathArgument> {
/**
* Get the type of modification.
*
- * @return Modification type.
+ * @return Operation type.
*/
- ModificationType getType();
+ abstract LogicalOperation getOperation();
/**
* Get the original tree node to which the modification is to be applied.
* @return The original node, or {@link Optional#absent()} if the node is
* a new node.
*/
- Optional<TreeNode> getOriginal();
+ abstract Optional<? extends TreeNode> getOriginal();
/**
* Get a read-only view of children nodes.
*
- * @return Iterable of all children nodes.
+ * @return Collection of all children nodes.
*/
- Iterable<? extends NodeModification> getChildren();
+ abstract Collection<? extends NodeModification> getChildren();
}