Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / persisted / ModifiedDataTreeCandidateNode.java
index 59d03d465e203cee23ef4cf3f06717cbbd35dd2b..6820e1c885b0b6857523610dc26b1a0d1b4ea6db 100644 (file)
@@ -7,9 +7,9 @@
  */
 package org.opendaylight.controller.cluster.datastore.persisted;
 
-import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import java.util.Collection;
+import java.util.Optional;
 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.tree.DataTreeCandidateNode;
@@ -22,13 +22,14 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType;
 abstract class ModifiedDataTreeCandidateNode extends AbstractDataTreeCandidateNode {
     private final Collection<DataTreeCandidateNode> children;
 
-    private ModifiedDataTreeCandidateNode(final ModificationType type, final Collection<DataTreeCandidateNode> children) {
+    private ModifiedDataTreeCandidateNode(final ModificationType type,
+            final Collection<DataTreeCandidateNode> children) {
         super(type);
         this.children = Preconditions.checkNotNull(children);
     }
 
-    static DataTreeCandidateNode create(final Collection<DataTreeCandidateNode> children) {
-        return new ModifiedDataTreeCandidateNode(ModificationType.SUBTREE_MODIFIED, children) {
+    static DataTreeCandidateNode create(final ModificationType type, final Collection<DataTreeCandidateNode> children) {
+        return new ModifiedDataTreeCandidateNode(type, children) {
             @Override
             public PathArgument getIdentifier() {
                 throw new UnsupportedOperationException("Root node does not have an identifier");
@@ -36,10 +37,11 @@ abstract class ModifiedDataTreeCandidateNode extends AbstractDataTreeCandidateNo
         };
     }
 
-    static DataTreeCandidateNode create(final PathArgument identifier, final ModificationType type, final Collection<DataTreeCandidateNode> children) {
+    static DataTreeCandidateNode create(final PathArgument identifier, final ModificationType type,
+            final Collection<DataTreeCandidateNode> children) {
         return new ModifiedDataTreeCandidateNode(type, children) {
             @Override
-            public final PathArgument getIdentifier() {
+            public PathArgument getIdentifier() {
                 return identifier;
             }
         };