Class AbstractMetaIterator
- java.lang.Object
-
- adams.data.spreadsheet.cellfinder.AbstractMetaIterator
-
- All Implemented Interfaces:
Iterator<CellLocation>
- Direct Known Subclasses:
CorrespondingColumn.CorrespondingColumnIterator
public abstract class AbstractMetaIterator extends Object implements Iterator<CellLocation>
A meta-iterator that wraps around a base iterator.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected Iterator<CellLocation>
m_Base
the base iterator to use.
-
Constructor Summary
Constructors Constructor Description AbstractMetaIterator(Iterator<CellLocation> base)
Initializes the iterator.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns whether another cell location is available.CellLocation
next()
Returns the next cell location.protected abstract CellLocation
process(CellLocation location)
Processes the cell location.void
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation), if the base iterator supports this.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
m_Base
protected Iterator<CellLocation> m_Base
the base iterator to use.
-
-
Constructor Detail
-
AbstractMetaIterator
public AbstractMetaIterator(Iterator<CellLocation> base)
Initializes the iterator.- Parameters:
base
- the base iterator to use
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns whether another cell location is available.- Specified by:
hasNext
in interfaceIterator<CellLocation>
- Returns:
- true if another is available
-
process
protected abstract CellLocation process(CellLocation location)
Processes the cell location.- Parameters:
location
- the location to process- Returns:
- the processed location
-
next
public CellLocation next()
Returns the next cell location.- Specified by:
next
in interfaceIterator<CellLocation>
- Returns:
- the cell location
-
remove
public void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation), if the base iterator supports this.- Specified by:
remove
in interfaceIterator<CellLocation>
-
-