org.axiondb.engine.rowiterators
Class AbstractAcceptingRowIterator

java.lang.Object
  extended by org.axiondb.engine.rowiterators.BaseRowIterator
      extended by org.axiondb.engine.rowiterators.AbstractFilteringRowIterator
          extended by org.axiondb.engine.rowiterators.AbstractAcceptingRowIterator
All Implemented Interfaces:
RowIterator
Direct Known Subclasses:
DistinctRowIterator, FilteringRowIterator

public abstract class AbstractAcceptingRowIterator
extends AbstractFilteringRowIterator

Abstract base DelegatingRowIteratorthat excludes Rows that are not acceptable.

Version:
$Revision: 1.5 $ $Date: 2005/04/08 13:40:43 $

Constructor Summary
AbstractAcceptingRowIterator(RowIterator iterator)
           
 
Method Summary
protected abstract  boolean acceptable(int rowindex, Row row)
          My filtering method.
protected  boolean determineNextRow()
           
protected  boolean determinePreviousRow()
           
 void set(Row row)
          Not supported in the base implementation.
 
Methods inherited from class org.axiondb.engine.rowiterators.AbstractFilteringRowIterator
clearNextRow, clearPreviousRow, current, currentIndex, getDelegate, hasCurrent, hasNext, hasPrevious, isNextAvailable, isPreviousAvailable, next, nextIndex, previous, previousIndex, remove, reset, setNext, setPrevious
 
Methods inherited from class org.axiondb.engine.rowiterators.BaseRowIterator
add, first, isEmpty, last, next, peekNext, peekPrevious, previous, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAcceptingRowIterator

public AbstractAcceptingRowIterator(RowIterator iterator)
Method Detail

set

public void set(Row row)
         throws AxionException
Description copied from class: BaseRowIterator
Not supported in the base implementation.

Specified by:
set in interface RowIterator
Overrides:
set in class AbstractFilteringRowIterator
Throws:
AxionException

acceptable

protected abstract boolean acceptable(int rowindex,
                                      Row row)
                               throws AxionException
My filtering method. Return true if the given Rowshould be included in the iteration, false otherwise.

Throws:
AxionException

determineNextRow

protected boolean determineNextRow()
                            throws AxionException
Specified by:
determineNextRow in class AbstractFilteringRowIterator
Throws:
AxionException

determinePreviousRow

protected boolean determinePreviousRow()
                                throws AxionException
Specified by:
determinePreviousRow in class AbstractFilteringRowIterator
Throws:
AxionException