X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2FTreeNodeUtils.java;h=fe98468b5cf370b4dddb003aeb04ee308382d58c;hp=339d9cb44e2ed9515daa1eabbb8db2d913dab91a;hb=2fffd8cdb3ed75f478b900c677bb4d97e5e91c9c;hpb=87aaa33c37ebf91368d23fc5f8f4916265d43712 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/TreeNodeUtils.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/TreeNodeUtils.java index 339d9cb44e..fe98468b5c 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/TreeNodeUtils.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/TreeNodeUtils.java @@ -21,7 +21,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 org.opendaylight.controller.md.sal.dom.store.impl.tree.spi.TreeNode} objects. + */ +public final class TreeNodeUtils { + private TreeNodeUtils() { + throw new UnsupportedOperationException("Utility class should not be instantiated"); + } /** * Finds a node in tree @@ -29,7 +35,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 > Optional findNode(final T tree, final InstanceIdentifier path) { Optional current = Optional. of(tree); @@ -40,7 +45,6 @@ public class TreeNodeUtils { return current; } - public static > T findNodeChecked(final T tree, final InstanceIdentifier path) { T current = tree; List nested = new ArrayList<>(path.getPath().size());