Package nzilbb.labbcat.server.search
Interface SearchResults
-
- All Superinterfaces:
AutoCloseable
,Closeable
,Iterator<String>
- All Known Implementing Classes:
ArraySearchResults
,SqlSearchResults
public interface SearchResults extends Iterator<String>, Closeable
Represents an iterable collection of results.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getLastMatchId()
The ID of the last match the iterator returned fromIterator.next()
String
getName()
A descriptive name for the collection.int
getPageLength()
The maximum number of results to return from next(), or 0 for no maximum.void
reset()
Resets the iterator to the beginning of the listboolean
seek(int n)
Go to the nth item in the list, so it will be the next returned byIterator.next()
.SearchResults
setPageLength(int newPageLength)
The maximum number of results to return from next(), or 0 for no maximum.int
size()
Returns the number of utterances in the collection.-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
getName
String getName()
A descriptive name for the collection.- Returns:
- A descriptive name for the collection.
-
reset
void reset()
Resets the iterator to the beginning of the list
-
size
int size()
Returns the number of utterances in the collection.- Returns:
- The number of utterances in the collection.
-
seek
boolean seek(int n)
Go to the nth item in the list, so it will be the next returned byIterator.next()
.- Parameters:
n
- The number of the item to seek to.- Returns:
- true if the nth item exists, false otherwise.
-
getLastMatchId
String getLastMatchId()
The ID of the last match the iterator returned fromIterator.next()
- Returns:
- The ID of the last match the iterator returned from
Iterator.next()
-
getPageLength
int getPageLength()
The maximum number of results to return from next(), or 0 for no maximum.- Returns:
- The maximum number of results to return from next(), or 0 for no maximum.
-
setPageLength
SearchResults setPageLength(int newPageLength)
The maximum number of results to return from next(), or 0 for no maximum.- Parameters:
newPageLength
- The maximum number of results to return from next(), or 0 for no maximum.
-
-