|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.IteratorRowSequence
Implementation of RowSequence based on an Iterator which
returns table rows in sequence. The iterator's next method may
throw an exception of the (unchecked) type
IteratorRowSequence.PackagedIOException
if it needs to throw something (Iterator.next is not declared
to throw any checked exceptions).
Nested Class Summary | |
static class |
IteratorRowSequence.PackagedIOException
Unchecked exception class to be used for smuggling IOExceptions out of the next method of an Iterator for use by IteratorRowSequence |
Constructor Summary | |
IteratorRowSequence(Iterator rowIt)
Constructs a new RowSequence from an Iterator. |
Method Summary | |
void |
close()
Indicates that this sequence will not be required any more. |
Object |
getCell(int icol)
Returns the contents of a cell in the current row. |
Object[] |
getRow()
Returns the contents of the current table row, as an array with the same number of elements as there are columns in this table. |
boolean |
next()
Attempts to advances the current row to the next one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IteratorRowSequence(Iterator rowIt)
IteratorRowSequence.PackagedIOException
s.
rowIt
- iterator over the rowsMethod Detail |
public boolean next() throws IOException
RowSequence
RowSequence.getCell(int)
or RowSequence.getRow()
methods.
next
in interface RowSequence
IOException
- if there is some errorpublic Object[] getRow()
RowSequence
getRow
in interface RowSequence
public Object getCell(int icol)
RowSequence
getCell
in interface RowSequence
public void close()
RowSequence
close
is undefined.
close
in interface RowSequence
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |