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 booleanhasNext()static <T> EmptyIterator<T>instance()Tnext()voidremove()
-
-
-
Method Detail
-
instance
public static <T> EmptyIterator<T> instance()
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
remove
public void remove() throws java.lang.UnsupportedOperationException- Specified by:
removein interfacejava.util.Iterator<T>- Throws:
java.lang.UnsupportedOperationException
-
-