public boolean absolute ( int position ) { if ( position < 0 ) { position += size ; } if ( position < 0 ) { beforeFirst ( ) ; return false ; } if ( position > size ) { afterLast ( ) ; return false ; } if ( size == 0 ) { return false ; } if ( position < currentPos ) { beforeFirst ( ) ; } // go to the tagget row; while ( position > currentPos ) { next ( ) ; } return true ; }
Uses similar semantics to java . sql . ResultSet except this is 0 based . When position is 0 or positive it is from the start ; when negative it is from end