wt.util
Class EmptyIterator

java.lang.Object
  extended bywt.util.EmptyIterator
All Implemented Interfaces:
Iterator

public class EmptyIterator
extends Object
implements Iterator

Iterator that can be used, to avoid overhead when the collection contains no elements. Singleton can be access via EmptyIterator.INSTANCE.

Supported API: false

Extendable: false


Field Summary
static EmptyIterator INSTANCE
           
 
Constructor Summary
(package private) EmptyIterator()
           
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final EmptyIterator INSTANCE
Constructor Detail

EmptyIterator

EmptyIterator()
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator