GraphEdge (@NotNull LinearGraph graph, int up, int down) { List<GraphEdge> edges = graph.getAdjacentEdges(up, EdgeFilter.NORMAL_DOWN); for (GraphEdge edge : edges) { if (intEqual(edge.getDownNodeIndex(), down)) { return edge; } } return null; }