public Iterator<BasicBlock> predecessorIterator(BasicBlock block) { TreeSet<BasicBlock> predecessorSet = new TreeSet<BasicBlock>(); Iterator<Edge> ei = incomingEdgeIterator(block); while (ei.hasNext()) { predecessorSet.add(ei.next().getSource());
public Iterator<BasicBlock> predecessorIterator(final BasicBlock block) { return new Iterator<BasicBlock>() { private Iterator<Edge> iter = incomingEdgeIterator(block); public boolean hasNext() { return iter.hasNext(); } public BasicBlock next() { return iter.next().getSource(); } public void remove() { throw new UnsupportedOperationException(); } };
    public Iterator<BasicBlock> predecessorIterator(BasicBlock block) {	TreeSet<BasicBlock> predecessorSet = new TreeSet<BasicBlock>();	Iterator<Edge> ei = incomingEdgeIterator(block);	while (ei.hasNext()) {	    predecessorSet.add(ei.next().getSource());	}	return predecessorSet.iterator();    }