RegisterSign In

API Documentation: Class RowCursor

Package: com.mckoi.sdb
implements java.util.ListIterator<com.mckoi.sdb.SDBRow>, com.mckoi.sdb.SDBTrustedObject

A row cursor is a random access and bi-directional iterator for traversing a set of rows in a table. RowCursor implements ListIterator and provides additional functionality making it appropriate for interactive applications (such as displaying the contents of a very large table dynamically in a GUI).

Methods Summary

long size()
void position(long p)
long position()
boolean hasNext()
boolean hasPrevious()
SDBRow next()
int nextIndex()
SDBRow previous()
int previousIndex()
void remove()
void add(SDBRow e)
void set(SDBRow e)

Method Details

long size()

Returns the size of the set of rows encapsulated by this cursor.

void position(long p)

Moves the iterator position to the given offset in the set where 0 will move the iterator to the first position, and -1 to before the first position. Note that for 'next' to return the first value in the set, the position must be set to -1. For 'previous' to return the last value in the set, the position must be set to size().

long position()

Returns the current position of the iterator cursor. A new iterator will always return -1 (before the first entry).

boolean hasNext()

Returns true if a call to 'next' will be able to return the next value in the list.

boolean hasPrevious()

Returns true if a call to 'previous' will be able to return the previous value in the list.

SDBRow next()

Moves the cursor to the next position in the list and returns the SDBRow at the new position.

int nextIndex()

Returns the position of the next value in the list.

SDBRow previous()

Moves the cursor to the previous position in the list and returns the SDBRow at the new position.

int previousIndex()

Returns the position of the previous value in the list.

void remove()

This operation is currently not available in RowCursor.

void add(SDBRow e)

Operation not supported in RowCursor.

void set(SDBRow e)

Operation not supported in RowCursor.

The text on this page is licensed under the Creative Commons Attribution 3.0 License. Java is a registered trademark of Oracle and/or its affiliates.
Mckoi is Copyright © 2000 - 2018 Diehl and Associates, Inc. All rights reserved.