Merge changes I63383291,I1c9f10e9,I9cac529f,I269d373b,I7ede3ba5,I4afc1e15
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / TreeNodeUtils.java
index 339d9cb44e2ed9515daa1eabbb8db2d913dab91a..99982d318cf5487699d2db60549e4ee194ed0540 100644 (file)
@@ -13,6 +13,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.opendaylight.controller.md.sal.dom.store.impl.tree.spi.TreeNode;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 
@@ -21,7 +22,13 @@ import com.google.common.base.Preconditions;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 
-public class TreeNodeUtils {
+/**
+ * A set of utility methods for interacting with {@link TreeNode} objects.
+ */
+public final class TreeNodeUtils {
+    private TreeNodeUtils() {
+        throw new UnsupportedOperationException("Utility class should not be instantiated");
+    }
 
     /**
      * Finds a node in tree
@@ -29,7 +36,6 @@ public class TreeNodeUtils {
      * @param tree Data Tree
      * @param path Path to the node
      * @return Optional with node if the node is present in tree, {@link Optional#absent()} otherwise.
-     *
      */
     public static <T extends StoreTreeNode<T>> Optional<T> findNode(final T tree, final InstanceIdentifier path) {
         Optional<T> current = Optional.<T> of(tree);
@@ -40,7 +46,6 @@ public class TreeNodeUtils {
         return current;
     }
 
-
     public static <T extends StoreTreeNode<T>> T findNodeChecked(final T tree, final InstanceIdentifier path) {
         T current = tree;
         List<PathArgument> nested = new ArrayList<>(path.getPath().size());