public Iterator<TextRange> revIterator() {
    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();
      }
    };
  }
public Iterator<TextRange> revIterator()