Class NonNullSingletonIterator<T>

  • All Implemented Interfaces:
    Iterator<T>

    public class NonNullSingletonIterator<T>
    extends Object
    implements Iterator<T>
    A singleton iterator for an object which is guaranteed to be not-null. Exploiting this invariant allows this class to be slightly more efficient than Collections.iterator()