boolean (int startNodeIndex, @Nullable GraphEdge edge, @NotNull EdgeFilter filter) { if (edge == null) return false; if (edge.getType().isNormalEdge()) { return (startNodeIndex == convertToInt(edge.getDownNodeIndex()) && filter.upNormal) || (startNodeIndex == convertToInt(edge.getUpNodeIndex()) && filter.downNormal); } else { return filter.special; } }