1 5 package org.h2.index; 6 7 import org.h2.result.Row; 8 9 12 public class LinearHashCursor implements Cursor { 13 private Row row; 14 private boolean end; 15 16 LinearHashCursor(Row row) { 17 this.row = row; 18 } 19 20 public Row get() { 21 return row; 22 } 23 24 public int getPos() { 25 return row == null ? -1 : row.getPos(); 26 } 27 28 public boolean next() { 29 if(row==null || end) { 30 row = null; 31 return false; 32 } 33 end = true; 34 return true; 35 } 36 37 } 38 | Popular Tags |