org.openstreetmap.osmosis.core.store
Class EmptyIterator<DataType>

java.lang.Object
  extended by org.openstreetmap.osmosis.core.store.EmptyIterator<DataType>
Type Parameters:
DataType - The type of data to be returned by the iterator.
All Implemented Interfaces:
java.util.Iterator<DataType>, Releasable, ReleasableIterator<DataType>

public class EmptyIterator<DataType>
extends java.lang.Object
implements ReleasableIterator<DataType>

Provides an iterator which returns no data. This is returned by iterator methods that have no data to be returned.

Author:
Brett Henderson

Constructor Summary
EmptyIterator()
           
 
Method Summary
 boolean hasNext()
          
 DataType next()
          
 void release()
          Performs resource cleanup tasks such as closing files, or database connections.
 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 java.util.Iterator<DataType>

next

public DataType next()

Specified by:
next in interface java.util.Iterator<DataType>

remove

public void remove()

Specified by:
remove in interface java.util.Iterator<DataType>

release

public void release()
Performs resource cleanup tasks such as closing files, or database connections. This must be called after all processing is complete and may be called multiple times. Implementations must call release on any nested Releasable objects. It should be called within a finally block to ensure it is called in exception scenarios.

Specified by:
release in interface Releasable