FreeHEP API
Version current

hep.tuple.interfaces
Interface FTupleCursor

All Known Implementing Classes:
Cursor

public interface FTupleCursor

A TupleCursor is used to step through the rows of an Tuple

Author:
The FreeHEP team @ SLAC.
Source Code:
FTupleCursor.java

Method Summary
 void close()
          Close this cursor.
 boolean next()
          Step to the next row.
 int row()
          Get the current row number
 void setRow(int n)
          Step to a specific row
 void skip(int rows)
          Skips rows.
 void start()
          Rewind the Cursor to BEFORE the first row.
 

Method Detail

row

public int row()
Get the current row number

Returns:
The current row number, or -1 if before the first row

start

public void start()
Rewind the Cursor to BEFORE the first row.


next

public boolean next()
Step to the next row.

Returns:
False if there are no more rows

skip

public void skip(int rows)
Skips rows.

Parameters:
rows - number of rows to skip, greater than 0.

setRow

public void setRow(int n)
Step to a specific row

Parameters:
n - The row to move to
Throws:
IndexOutOfBoundsException - if the index is < 0 or >= number of rows
UnsupportedOperationException - if the Tuple does not support random access

close

public void close()
Close this cursor. Any further attempts to use the cursor will result in an IllegalStateException.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.