Class ConvertingCursor<S,T>
java.lang.Object
org.springframework.data.redis.core.ConvertingCursor<S,T>
- Type Parameters:
S-T-
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterator<T>, Cursor<T>, CloseableIterator<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.- Since:
- 1.4
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from interface Cursor
Cursor.CursorId -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIterator
spliterator, streamMethods inherited from interface Iterator
forEachRemaining
-
Constructor Details
-
ConvertingCursor
-
-
Method Details
-
hasNext
-
next
-
remove
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<S>
-
getId
Description copied from interface:CursorReturns the reference cursor. -
getCursorId
Deprecated.Description copied from interface:CursorGet the reference cursor.
NOTE: the id might change while iterating items.- Specified by:
getCursorIdin interfaceCursor<S>- Returns:
-
isClosed
-
getPosition
public long getPosition()- Specified by:
getPositionin interfaceCursor<S>- Returns:
- the current position of the cursor.
-