Package dev.morphia.query
Class MorphiaCursor<T>
- java.lang.Object
-
- dev.morphia.query.MorphiaCursor<T>
-
- Type Parameters:
T
- the original type being iterated
- All Implemented Interfaces:
com.mongodb.client.MongoCursor<T>
,Closeable
,AutoCloseable
,Iterator<T>
- Direct Known Subclasses:
MorphiaCursor
public class MorphiaCursor<T> extends Object implements com.mongodb.client.MongoCursor<T>
- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor Description MorphiaCursor(com.mongodb.client.MongoCursor<T> cursor)
Creates a MorphiaCursor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the underlying cursor.com.mongodb.ServerAddress
getServerAddress()
com.mongodb.ServerCursor
getServerCursor()
boolean
hasNext()
T
next()
void
remove()
List<T>
toList()
Converts this cursor to a List.T
tryNext()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
MorphiaCursor
public MorphiaCursor(com.mongodb.client.MongoCursor<T> cursor)
Creates a MorphiaCursor- Parameters:
cursor
- the Iterator to use
-
-
Method Detail
-
close
public void close()
Closes the underlying cursor.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacecom.mongodb.client.MongoCursor<T>
-
hasNext
public boolean hasNext()
-
next
@NonNull public T next()
-
getServerCursor
public com.mongodb.ServerCursor getServerCursor()
- Specified by:
getServerCursor
in interfacecom.mongodb.client.MongoCursor<T>
-
getServerAddress
@NonNull public com.mongodb.ServerAddress getServerAddress()
- Specified by:
getServerAddress
in interfacecom.mongodb.client.MongoCursor<T>
-
-