public void next() throws NativeDB.DBException { assertAllocated(); IteratorJNI.Next(self); checkStatus(); }
public void close() { iterator.delete(); }
public Map.Entry<byte[], byte[]> peekPrev() { try { iterator.prev(); try { return peekNext(); } finally { if (iterator.isValid()) { iterator.next(); } else { iterator.seekToFirst(); } } } catch (NativeDB.DBException e) { throw new RuntimeException(e); } }
public void delete() { assertAllocated(); IteratorJNI.delete(self); self = 0; }
public void seek(byte[] key) { try { iterator.seek(key); } catch (NativeDB.DBException e) { if( e.isNotFound() ) { throw new NoSuchElementException(); } else { throw new RuntimeException(e); } } }
public Map.Entry<byte[], byte[]> next() { Map.Entry<byte[], byte[]> rc = peekNext(); try { iterator.next(); } catch (NativeDB.DBException e) { throw new RuntimeException(e); } return rc; }
public Map.Entry<byte[], byte[]> prev() { Map.Entry<byte[], byte[]> rc = peekPrev(); try { iterator.prev(); } catch (NativeDB.DBException e) { throw new RuntimeException(e); } return rc; }
public void seekToFirst() { iterator.seekToFirst(); }
public NativeIterator iterator(NativeReadOptions options) { checkArgNotNull(options, "options"); return new NativeIterator(DBJNI.NewIterator(self, options)); }
public boolean hasNext() { return iterator.isValid(); }
public void delete() { assertAllocated(); IteratorJNI.delete(self); self = 0; }
public void seek(byte[] key) { try { iterator.seek(key); } catch (NativeDB.DBException e) { if( e.isNotFound() ) { throw new NoSuchElementException(); } else { throw new RuntimeException(e); } } }
public Map.Entry<byte[], byte[]> next() { Map.Entry<byte[], byte[]> rc = peekNext(); try { iterator.next(); } catch (NativeDB.DBException e) { throw new RuntimeException(e); } return rc; }
public Map.Entry<byte[], byte[]> prev() { Map.Entry<byte[], byte[]> rc = peekPrev(); try { iterator.prev(); } catch (NativeDB.DBException e) { throw new RuntimeException(e); } return rc; }
public void seekToFirst() { iterator.seekToFirst(); }
public NativeIterator iterator(NativeReadOptions options) { checkArgNotNull(options, "options"); return new NativeIterator(DBJNI.NewIterator(self, options)); }
public boolean hasNext() { return iterator.isValid(); }