Graph addNode(GraphNode node) { if (nodes.contains(node)) { return this; } nodes.add(node); return this; }