Package com.ibm.wala.util.collections
Class EmptyIterator<T>
- java.lang.Object
-
- com.ibm.wala.util.collections.EmptyIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
public final class EmptyIterator<T> extends java.lang.Object implements java.util.Iterator<T>
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 <T> EmptyIterator<T>
instance()
T
next()
void
remove()
-
-
-
Method Detail
-
instance
public static <T> EmptyIterator<T> instance()
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
remove
public void remove() throws java.lang.UnsupportedOperationException
- Specified by:
remove
in interfacejava.util.Iterator<T>
- Throws:
java.lang.UnsupportedOperationException
-
-