@ Nullable public ResultT first ( ) { final CoreRemoteMongoCursor < ResultT > cursor = iterator ( ) ; if ( ! cursor . hasNext ( ) ) { return null ; } return cursor . next ( ) ; }
Helper to return the first item in the iterator or null .