List<Integer> (final int nodeIndex, @NotNull final NodeFilter filter) { return ContainerUtil.mapNotNull(graph.getAdjacentEdges(nodeIndex, filter.edgeFilter), edge -> { if (isEdgeUp(edge, nodeIndex)) return edge.getUpNodeIndex(); if (isEdgeDown(edge, nodeIndex)) return edge.getDownNodeIndex(); return null; }); }