org.axiondb.engine.rowiterators
Class TransformingRowIterator

java.lang.Object
  extended byorg.axiondb.engine.rowiterators.DelegatingRowIterator
      extended byorg.axiondb.engine.rowiterators.TransformingRowIterator
All Implemented Interfaces:
RowIterator

public abstract class TransformingRowIterator
extends DelegatingRowIterator

A DelegatingRowIterator that transforms each returned Row.

Version:
$Revision: 1.4 $ $Date: 2002/12/16 23:34:54 $

Constructor Summary
TransformingRowIterator(RowIterator iter)
           
 
Method Summary
 Row current()
          Returns the last Rowreturned by me (by next(),previous(), first(),last(), etc.).
 Row first()
          Returns the first Rowin the list, positioning the cursor to just before the first Rowin the list.
 Row last()
          Returns the last Rowin the list, positioning the cursor to just after the last Rowin the list.
 Row next()
          Returns the next Rowin the list, or throws NoSuchElementExceptionif no next Row exists.
 Row previous()
          Returns the previous Rowin the list, or throws NoSuchElementExceptionif no next Row exists.
protected abstract  Row transform(Row row)
           
 
Methods inherited from class org.axiondb.engine.rowiterators.DelegatingRowIterator
add, currentIndex, getDelegate, hasCurrent, hasNext, hasPrevious, isEmpty, nextIndex, peekNext, peekPrevious, previousIndex, remove, reset, set, setDelegate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformingRowIterator

public TransformingRowIterator(RowIterator iter)
Method Detail

transform

protected abstract Row transform(Row row)

current

public Row current()
Description copied from interface: RowIterator
Returns the last Rowreturned by me (by RowIterator.next(),RowIterator.previous(), RowIterator.first(),RowIterator.last(), etc.).

Specified by:
current in interface RowIterator
Overrides:
current in class DelegatingRowIterator

first

public Row first()
          throws AxionException
Description copied from interface: RowIterator
Returns the first Rowin the list, positioning the cursor to just before the first Rowin the list. (In other words, after first is called both RowIterator.next()and RowIterator.current()will return the first row in the list.)

Specified by:
first in interface RowIterator
Overrides:
first in class DelegatingRowIterator
Throws:
AxionException

last

public Row last()
         throws AxionException
Description copied from interface: RowIterator
Returns the last Rowin the list, positioning the cursor to just after the last Rowin the list. (In other words, after last is called both RowIterator.previous()and RowIterator.current()will return the last row in the list.)

Specified by:
last in interface RowIterator
Overrides:
last in class DelegatingRowIterator
Throws:
AxionException

next

public Row next()
         throws AxionException
Description copied from interface: RowIterator
Returns the next Rowin the list, or throws NoSuchElementExceptionif no next Row exists.

Specified by:
next in interface RowIterator
Overrides:
next in class DelegatingRowIterator
Throws:
AxionException

previous

public Row previous()
             throws AxionException
Description copied from interface: RowIterator
Returns the previous Rowin the list, or throws NoSuchElementExceptionif no next Row exists.

Specified by:
previous in interface RowIterator
Overrides:
previous in class DelegatingRowIterator
Throws:
AxionException