Package com.coyotegulch.jisp
Interface IndexIterator
- All Known Implementing Classes:
BTreeIterator
public interface IndexIterator
IndexIterator
defines an object that references a specific object relative to other
objects in an ObjectIndex
.
-
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Returns the keyObject
currently referenced by this iterator.long
Returns the recordObject
currently referenced by this iterator.boolean
isValid()
Checks to see if this iterator is valid.boolean
Moves this iterator to the first record in sequence.boolean
moveLast()
Moves this iterator to the last record in sequence.boolean
moveNext()
Moves this iterator to the next record in sequence.boolean
Moves this iterator to the previous record in sequence.boolean
Moves this iterator to the record associated with the givenkey
.boolean
Moves this iterator to the record associated with the givenkey
.
-
Method Details
-
getRecPtr
Returns the recordObject
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 - Throws:
IOException
-
getKey
Returns the keyObject
currently referenced by this iterator.- Returns:
- the key
Object
currently referenced by this iterator; returnsnull
if the iterator is invalid or the record was not found - Throws:
IOException
-
moveNext
Moves this iterator to the next record in sequence.- Returns:
true
if the operation was successful;false
otherwise- Throws:
IOException
ClassNotFoundException
-
movePrevious
Moves this iterator to the previous record in sequence.- Returns:
true
if the operation was successful;false
otherwise.- Throws:
IOException
ClassNotFoundException
-
moveFirst
Moves this iterator to the first record in sequence.- Returns:
true
if the operation was successful;false
otherwise.- Throws:
IOException
ClassNotFoundException
-
moveLast
Moves this iterator to the last record in sequence.- Returns:
true
if the operation was successful;false
otherwise.- Throws:
IOException
ClassNotFoundException
-
moveTo
Moves this iterator to the record associated with the givenkey
.- Parameters:
key
- key identifier to find- Returns:
true
if the operation was successful;false
otherwise.- Throws:
IOException
ClassNotFoundException
-
moveTo
Moves this iterator to the record associated with the givenkey
.- Parameters:
key
- key identifier to find- Returns:
true
if the operation was successful;false
otherwise.- Throws:
IOException
ClassNotFoundException
-
isValid
boolean isValid()Checks to see if this iterator is valid.- Returns:
true
if the iterator is valid;false
if it is invalid.
-