import java.util.ArrayList; public class Node { private E element; private ArrayList> edges; public Node(E e) { edges = new ArrayList<>(); element=e; } public ArrayList> getEdges() { return edges; } public E getValue() { return element; } public void addEdgeTo(Node too, String id) { edges.add(new Edge(this, too, id)); } public String toString() { return element.toString(); } }