infovis.utils
Class TableIterator

java.lang.Object
  extended by infovis.utils.AbstractRowIterator
      extended by infovis.utils.TableIterator
All Implemented Interfaces:
RowIterator, Iterator
Direct Known Subclasses:
ColumnIterator, IdManagerIterator

public class TableIterator
extends AbstractRowIterator

Iterator over table rows.

Version:
$Revision: 1.14 $
Author:
Jean-Daniel Fekete

Constructor Summary
TableIterator(int first, int end)
          Creates an iterator over a table given its first row, its end (1 + last).
TableIterator(int first, int end, boolean up)
          Creates an iterator over a table given its first row, its end (1 + last) and its direction.
 
Method Summary
 RowIterator copy()
          Clone myself with the right type returned.
 boolean hasNext()
           
 int nextRow()
          Returns the next row after incrementing the iterator.
 int peekRow()
          Returns the next row without incrementing the iterator.
 void remove()
           
 
Methods inherited from class infovis.utils.AbstractRowIterator
next
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableIterator

public TableIterator(int first,
                     int end,
                     boolean up)
Creates an iterator over a table given its first row, its end (1 + last) and its direction.

Parameters:
first - the first row
end - the end of the iterator
up - true if the iterator goes from lower value to upper values, false otherwise

TableIterator

public TableIterator(int first,
                     int end)
Creates an iterator over a table given its first row, its end (1 + last). The direction is guessed.

Parameters:
first - the first row
end - the end of the iterator
Method Detail

hasNext

public boolean hasNext()

remove

public void remove()

nextRow

public int nextRow()
Description copied from interface: RowIterator
Returns the next row after incrementing the iterator.

Returns:
the next row.

peekRow

public int peekRow()
Description copied from interface: RowIterator
Returns the next row without incrementing the iterator.

Returns:
the next row.

copy

public RowIterator copy()
Description copied from interface: RowIterator
Clone myself with the right type returned.

Returns:
a copy of myself.
See Also:
RowIterator.copy()


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.