org.modeshape.common.collection
Class EmptyIterator<T>

java.lang.Object
  extended by org.modeshape.common.collection.EmptyIterator<T>
Type Parameters:
T - the type of the elements over which the iteration is being performed
All Implemented Interfaces:
Iterator<T>

@Immutable
public final class EmptyIterator<T>
extends Object
implements Iterator<T>

A reusuable Iterator implementation that has no elements. Note that the objects are immutable, and therefore may be shared and reused.


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

Constructor Detail

EmptyIterator

public EmptyIterator()
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<T>
See Also:
Iterator.hasNext()

next

public T next()

Specified by:
next in interface Iterator<T>
See Also:
Iterator.next()

remove

public void remove()

Specified by:
remove in interface Iterator<T>
See Also:
Iterator.remove()


Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.