de.hpi.fgis.dude.util
Class AbstractIterator<ElementType>

java.lang.Object
  extended by de.hpi.fgis.dude.util.AbstractIterator<ElementType>
Type Parameters:
ElementType - The type of the elements over which the iterator iterates.
All Implemented Interfaces:
Iterator<ElementType>
Direct Known Subclasses:
AbstractDataSource.AbstractDataSourceIterator, AdaptiveSNM_Yan2007.YanIterator, ChainedIterator, DuDeJsonParser, NaiveRecordLinkage.NaiveRecordLinkageIterator, NaiveTransitiveClosureGenerator.TransitiveClosureIterator, SortedNeighborhoodMethod.SortedNeighborhoodMethodIterator, WarshallTransitiveClosureGenerator.TransitiveClosureIterator

public abstract class AbstractIterator<ElementType>
extends Object
implements Iterator<ElementType>

AbstractIterator is an abstract class that should be used within all iterator-like classes. It implements most of the iterator functionality.

Author:
Matthias Pohl

Constructor Summary
AbstractIterator()
           
 
Method Summary
 boolean hasNext()
           
protected abstract  ElementType loadNextElement()
          Returns the element of the next iteration step.
 ElementType next()
           
 void remove()
          This method is not implemented and will throw an UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIterator

public AbstractIterator()
Method Detail

hasNext

public final boolean hasNext()
Specified by:
hasNext in interface Iterator<ElementType>

next

public final ElementType next()
Specified by:
next in interface Iterator<ElementType>

remove

public final void remove()
This method is not implemented and will throw an UnsupportedOperationException.

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

loadNextElement

protected abstract ElementType loadNextElement()
Returns the element of the next iteration step. This method needs to be implemented by each sub-class.

Returns:
The next element.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.