com.ibm.wala.util.collections
Class EmptyIntIterator

java.lang.Object
  extended by com.ibm.wala.util.collections.EmptyIntIterator
All Implemented Interfaces:
IntIterator

public final class EmptyIntIterator
extends java.lang.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
 boolean hasNext()
           
static EmptyIntIterator instance()
           
 int next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static EmptyIntIterator instance()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface IntIterator
Returns:
true iff this iterator has a next element

next

public int next()
         throws java.util.NoSuchElementException
Specified by:
next in interface IntIterator
Returns:
next integer in the iteration
Throws:
java.util.NoSuchElementException