com.coyotegulch.jisp

Interface IndexIterator

public interface IndexIterator

IndexIterator defines an object that references a specific object relative to other objects in an ObjectIndex.

See Also: ObjectIndex BTreeIndex BTreeIterator IndexedObjectDatabase

Method Summary
ObjectgetKey()
Returns the key Object currently referenced by this iterator.
longgetRecPtr()
Returns the record Object currently referenced by this iterator.
booleanisValid()
Checks to see if this iterator is valid.
booleanmoveFirst()
Moves this iterator to the first record in sequence.
booleanmoveLast()
Moves this iterator to the last record in sequence.
booleanmoveNext()
Moves this iterator to the next record in sequence.
booleanmovePrevious()
Moves this iterator to the previous record in sequence.
booleanmoveTo(KeyObject key)
Moves this iterator to the record associated with the given key.
booleanmoveTo(KeyObject key, boolean acceptNext)
Moves this iterator to the record associated with the given key.

Method Detail

getKey

public Object getKey()
Returns the key Object currently referenced by this iterator.

Returns: the key Object currently referenced by this iterator; returns null if the iterator is invalid or the record was not found

getRecPtr

public long getRecPtr()
Returns the record Object currently referenced by this iterator.

Returns: a long pointer (usually a file position) associated with this index entry; returns -1 if the iterator is invalid or the record was not found

isValid

public boolean isValid()
Checks to see if this iterator is valid.

Returns: true if the iterator is valid; false if it is invalid.

moveFirst

public boolean moveFirst()
Moves this iterator to the first record in sequence.

Returns: true if the operation was successful; false otherwise.

moveLast

public boolean moveLast()
Moves this iterator to the last record in sequence.

Returns: true if the operation was successful; false otherwise.

moveNext

public boolean moveNext()
Moves this iterator to the next record in sequence.

Returns: true if the operation was successful; false otherwise

movePrevious

public boolean movePrevious()
Moves this iterator to the previous record in sequence.

Returns: true if the operation was successful; false otherwise.

moveTo

public boolean moveTo(KeyObject key)
Moves this iterator to the record associated with the given key.

Parameters: key key identifier to find

Returns: true if the operation was successful; false otherwise.

moveTo

public boolean moveTo(KeyObject key, boolean acceptNext)
Moves this iterator to the record associated with the given key.

Parameters: key key identifier to find

Returns: true if the operation was successful; false otherwise.