// you still need to implement hasNext() and next() static abstract class IterableIterator implements Iterator, Iterable { public Iterator iterator() { this; } public void remove() { unsupportedOperation(); } }