- All Implemented Interfaces:
Iterable<T>
public class IterableIteratorWrapper<T>
extends Object
implements Iterable<T>
Needed because Java does not support enhanced for loop
with Iterator elements :-( why? Only Iterable is supported.
-
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Details
-
IterableIteratorWrapper
public IterableIteratorWrapper(Iterator<T> iter)
Create a new wrapper.
- Parameters:
iter
- The iterator.
-
Method Details
-
iterator
Get the iterator.
- Specified by:
iterator
in interface Iterable<T>
- Returns:
- The iterator.