EdgeImpl<Integer> (@NotNull GraphEdge edge, @NotNull LinearGraph graph, boolean removed) { Integer up = null; Integer down = null; if (edge.getUpNodeIndex() != null) { up = graph.getNodeId(edge.getUpNodeIndex()); } if (edge.getDownNodeIndex() != null) { down = graph.getNodeId(edge.getDownNodeIndex()); } return new EdgeImpl<>(up, down, edge.getTargetId(), removed); }