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
* @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);
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());