S - T - public class ConvertingCursor<S,T> extends Object implements Cursor<T>
ConvertingCursor wraps a given cursor and applies given Converter to items prior to returning them.
This allows to easily perform required conversion whereas the underlying implementation may still work with its
native types.| Constructor and Description |
|---|
ConvertingCursor(Cursor<S> cursor,
Converter<S,T> converter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getCursorId()
Get the reference cursor.
|
long |
getPosition() |
boolean |
hasNext() |
boolean |
isClosed() |
T |
next() |
Cursor<T> |
open()
Opens cursor and returns itself.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitspliterator, streamforEachRemainingpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface CloseableIterator<T>public long getCursorId()
CursorgetCursorId in interface Cursor<T>public boolean isClosed()
public Cursor<T> open()
CursorCursor
and should not be called externally.public long getPosition()
getPosition in interface Cursor<T>Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.