- All Implemented Interfaces:
- Iterator<T>
public class SingleIterator<T>
extends Object
implements Iterator<T>
SingleIterator is an iterator that only contains one object of type T.
This is more efficient than using Arrays.asList(object).iterator() (approx. 2x faster).
This has applications in various metapipes, where single objects are manipulated at a time.
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)