public class LimitCursor<S> extends AbstractCursor<S>
SkipCursor| Constructor and Description |
|---|
LimitCursor(Cursor<S> source,
long limit) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Call close to release any resources being held by this cursor.
|
boolean |
hasNext()
Returns true if this cursor has more elements.
|
S |
next()
Returns the next element from this cursor.
|
int |
skipNext(int amount)
Skips forward by the specified amount of elements, returning the actual
amount skipped.
|
copyInto, copyInto, toList, toListpublic boolean hasNext()
throws FetchException
Cursornext would return an element rather than throwing
an exception.FetchException - if storage layer throws an exceptionpublic S next() throws FetchException
CursorFetchException - if storage layer throws an exceptionpublic int skipNext(int amount)
throws FetchException
CursorskipNext in interface Cursor<S>skipNext in class AbstractCursor<S>amount - maximum amount of elements to skipFetchException - if storage layer throws an exceptionpublic void close()
throws FetchException
CursorFetchExceptionCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.