List<GraphEdge> (int nodeIndex, @NotNull EdgeFilter filter) { List<GraphEdge> result = new SmartList<>(); for (Pair<Integer, GraphEdgeType> retrievedEdge : myEdgeStorage.getEdges(myGetNodeIdByIndex.fun(nodeIndex))) { GraphEdge edge = decompressEdge(nodeIndex, retrievedEdge.first, retrievedEdge.second); if (matchedEdge(nodeIndex, edge, filter)) result.add(edge); } return result; }