Iterator<Chunk<Node>> (Chunk<Node> chunk) { final Set<Node> chunkNodes = chunk.getNodes(); final Set<Chunk<Node>> ins = new LinkedHashSet<>(); for (final Node node : chunkNodes) { for (Iterator<Node> nodeIns = graph.getIn(node); nodeIns.hasNext(); ) { final Node in = nodeIns.next(); if (!chunk.containsNode(in)) { ins.add(nodeToChunkMap.get(in)); } } } return ins.iterator(); }