Package com.ibm.wala.util.collections
Class NonNullSingletonIterator<T>
java.lang.Object
com.ibm.wala.util.collections.NonNullSingletonIterator<T>
- All Implemented Interfaces:
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()
-
Constructor Details
-
NonNullSingletonIterator
- Parameters:
o
- the single object in this collection, must be non-null
-
-
Method Details