public Object next ( ) { try { if ( ! _primed ) { _primed = _rs . next ( ) ; if ( ! _primed ) { throw new NoSuchElementException ( ) ; } } // reset upon consumption _primed = false ; return _rowMapper . mapRowToReturnType ( ) ; } catch ( SQLException e ) { // Since Iterator interface is locked, all we can do // is put the real exception inside an expected one. NoSuchElementException xNoSuch = new NoSuchElementException ( "ResultSet exception: " + e ) ; xNoSuch . initCause ( e ) ; throw xNoSuch ; } }
Get the next element in the iteration .