Collection<GraphEdge> () { Set<GraphEdge> result = new HashSet<>(); Set<GraphEdge> hidden = myHiddenEdges.getEdges(); result.addAll(ContainerUtil.filter(hidden, graphEdge -> graphEdge.getType() != GraphEdgeType.DOTTED)); result.addAll(ContainerUtil.intersection(hidden, myLinearGraph.myDottedEdges.getEdges())); result.removeAll(myLinearGraph.myHiddenEdges.getEdges()); return result; }