@@ -0,0 +1,818 @@
+package son.graph.helpers;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport son.graph.models.interfaces.Edge;%0Aimport son.graph.models.interfaces.Graph;%0Aimport son.graph.models.interfaces.Node;%0A%0Apublic class GraphHelper %7B%0A%09public static List%3CString%3E getNames(List%3CNode%3E nodes) %7B%0A%09%09List%3CString%3E names = new ArrayList%3C%3E();%0A%09%09for (Node node : nodes) %7B%0A%09%09%09names.add(node.getName());%0A%09%09%7D%0A%09%09return names;%0A%09%7D%0A%0A%09public static List%3CNode%3E getNodes(Graph graph, String... names) %7B%0A%09%09List%3CNode%3E nodes = new ArrayList%3C%3E();%0A%0A%09%09for (String name : names) %7B%0A%09%09%09nodes.add(graph.getNodes().get(name));%0A%09%09%7D%0A%09%09return nodes;%0A%09%7D%0A%0A%09public static List%3CNode%3E getNextNodes(Node node) %7B%0A%09%09List%3CNode%3E nextNodes = new ArrayList%3C%3E();%0A%09%09for (Edge edge : node.getEdges()) %7B%0A%09%09%09nextNodes.add(edge.getNextNode());%0A%09%09%7D%0A%09%09return nextNodes;%0A%09%7D%0A%7D%0A

Add some helper methods in graph helper class