Iterator<TextRange> () { return new Iterator<TextRange>() { private final ListIterator<TextRange> it = myRanges.listIterator(myRanges.size()); @Override public boolean hasNext() { return it.hasPrevious(); } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public TextRange next() { return it.previous(); } }; }