Docs Menu

Class MongoCursor

On this page

  • io.realm.mongodb.mongo.iterable
  • Method Summary
  • Inherited Methods
  • Method Detail
  • close
  • hasNext
  • next
  • tryNext
java.lang.Object
io.realm.mongodb.mongo.iterable.MongoCursor

Implemented interfaces:

The Mongo Cursor class is fundamentally an Iterator containing an additional tryNext() method for convenience.

An application should ensure that a cursor is closed in all circumstances, e.g. using a try-with-resources statement.

Modifier and Type
Method and Description
public void
public boolean
public ResultT
next ()

public ResultT

A special next() case that returns the next document if available or null.

  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize
public void close ()

public boolean hasNext ()

public ResultT next ()

public ResultT tryNext ()

A special next() case that returns the next document if available or null.

Returns

A Task containing the next document if available or null.

←  Class FindIterableClass MongoIterable →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.