GraphEdges (@NotNull GraphEdges graphEdges) { Set<GraphEdge> edgesInCurrentRow = graphEdges.myEdges; int currentRow = graphEdges.myRow; edgesInCurrentRow.addAll(createDownEdges(currentRow)); edgesInCurrentRow.removeAll(createUpEdges(currentRow + 1)); return new GraphEdges(edgesInCurrentRow, currentRow + 1); }