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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetKey()Returns the keyObjectcurrently referenced by this iterator.longReturns the recordObjectcurrently referenced by this iterator.booleanisValid()Checks to see if this iterator is valid.booleanMoves 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.booleanMoves this iterator to the previous record in sequence.booleanMoves this iterator to the record associated with the givenkey.booleanMoves this iterator to the record associated with the givenkey.
-
Method Details
-
getRecPtr
Returns the recordObjectcurrently referenced by this iterator.- Returns:
- a
longpointer (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 keyObjectcurrently referenced by this iterator.- Returns:
- the key
Objectcurrently referenced by this iterator; returnsnullif the iterator is invalid or the record was not found - Throws:
IOException
-
moveNext
Moves this iterator to the next record in sequence.- Returns:
trueif the operation was successful;falseotherwise- Throws:
IOExceptionClassNotFoundException
-
movePrevious
Moves this iterator to the previous record in sequence.- Returns:
trueif the operation was successful;falseotherwise.- Throws:
IOExceptionClassNotFoundException
-
moveFirst
Moves this iterator to the first record in sequence.- Returns:
trueif the operation was successful;falseotherwise.- Throws:
IOExceptionClassNotFoundException
-
moveLast
Moves this iterator to the last record in sequence.- Returns:
trueif the operation was successful;falseotherwise.- Throws:
IOExceptionClassNotFoundException
-
moveTo
Moves this iterator to the record associated with the givenkey.- Parameters:
key- key identifier to find- Returns:
trueif the operation was successful;falseotherwise.- Throws:
IOExceptionClassNotFoundException
-
moveTo
Moves this iterator to the record associated with the givenkey.- Parameters:
key- key identifier to find- Returns:
trueif the operation was successful;falseotherwise.- Throws:
IOExceptionClassNotFoundException
-
isValid
boolean isValid()Checks to see if this iterator is valid.- Returns:
trueif the iterator is valid;falseif it is invalid.
-