Package com.ibm.wala.util.collections
Class EmptyIntIterator
- java.lang.Object
-
- com.ibm.wala.util.collections.EmptyIntIterator
-
- All Implemented Interfaces:
IntIterator
public final class EmptyIntIterator extends Object implements IntIterator
A singleton instance of an empty iterator; this is better than Collections.EMPTY_SET.iterator(), which allocates an iterator object;
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
static EmptyIntIterator
instance()
int
next()
-
-
-
Method Detail
-
instance
public static EmptyIntIterator instance()
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIntIterator
- Returns:
- true iff this iterator has a next element
-
next
public int next() throws NoSuchElementException
- Specified by:
next
in interfaceIntIterator
- Returns:
- next integer in the iteration
- Throws:
NoSuchElementException
-
-