FreeHEP API
Version current

hep.tuple
Class Cursor

java.lang.Object
  extended byhep.tuple.Cursor
All Implemented Interfaces:
FTupleCursor

public class Cursor
extends Object
implements FTupleCursor

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

Constructor Summary
  Cursor(int startRow, int endRow, boolean hasRandomAccess)
           
protected Cursor(Tuple tuple)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cursor

protected Cursor(Tuple tuple)

Cursor

public Cursor(int startRow,
              int endRow,
              boolean hasRandomAccess)
Method Detail

row

public int row()
Description copied from interface: FTupleCursor
Get the current row number

Specified by:
row in interface FTupleCursor
Returns:
The current row number, or -1 if before the first row

start

public void start()
Description copied from interface: FTupleCursor
Rewind the Cursor to BEFORE the first row.

Specified by:
start in interface FTupleCursor

next

public boolean next()
Description copied from interface: FTupleCursor
Step to the next row.

Specified by:
next in interface FTupleCursor
Returns:
False if there are no more rows

setRow

public void setRow(int n)
Description copied from interface: FTupleCursor
Step to a specific row

Specified by:
setRow in interface FTupleCursor
Parameters:
n - The row to move to

close

public void close()
Description copied from interface: FTupleCursor
Close this cursor. Any further attempts to use the cursor will result in an IllegalStateException.

Specified by:
close in interface FTupleCursor

skip

public void skip(int rows)
Description copied from interface: FTupleCursor
Skips rows.

Specified by:
skip in interface FTupleCursor
Parameters:
rows - number of rows to skip, greater than 0.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.