Package com.coyotegulch.jisp
Interface IndexIterator
-
- All Known Implementing Classes:
BTreeIterator
public interface IndexIteratorIndexIteratordefines an object that references a specific object relative to other objects in anObjectIndex.- See Also:
ObjectIndex,BTreeIndex,BTreeIterator,IndexedObjectDatabase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetKey()Returns the keyObjectcurrently referenced by this iterator.longgetRecPtr()Returns the recordObjectcurrently 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 givenkey.booleanmoveTo(KeyObject key, boolean acceptNext)Moves this iterator to the record associated with the givenkey.
-
-
-
Method Detail
-
getRecPtr
long getRecPtr() throws java.io.IOExceptionReturns 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:
java.io.IOException
-
getKey
java.lang.Object getKey() throws java.io.IOExceptionReturns 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:
java.io.IOException
-
moveNext
boolean moveNext() throws java.io.IOException, java.lang.ClassNotFoundExceptionMoves this iterator to the next record in sequence.- Returns:
trueif the operation was successful;falseotherwise- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
movePrevious
boolean movePrevious() throws java.io.IOException, java.lang.ClassNotFoundExceptionMoves this iterator to the previous record in sequence.- Returns:
trueif the operation was successful;falseotherwise.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
moveFirst
boolean moveFirst() throws java.io.IOException, java.lang.ClassNotFoundExceptionMoves this iterator to the first record in sequence.- Returns:
trueif the operation was successful;falseotherwise.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
moveLast
boolean moveLast() throws java.io.IOException, java.lang.ClassNotFoundExceptionMoves this iterator to the last record in sequence.- Returns:
trueif the operation was successful;falseotherwise.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
moveTo
boolean moveTo(KeyObject key) throws java.io.IOException, java.lang.ClassNotFoundException
Moves this iterator to the record associated with the givenkey.- Parameters:
key- key identifier to find- Returns:
trueif the operation was successful;falseotherwise.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
moveTo
boolean moveTo(KeyObject key, boolean acceptNext) throws java.io.IOException, java.lang.ClassNotFoundException
Moves this iterator to the record associated with the givenkey.- Parameters:
key- key identifier to find- Returns:
trueif the operation was successful;falseotherwise.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
isValid
boolean isValid()
Checks to see if this iterator is valid.- Returns:
trueif the iterator is valid;falseif it is invalid.
-
-