Scan( RecordStore<R> store, boolean forward, final Predicate<? super R>... filters ) { this.filters = filters; this.ids = new StoreIdIterator( store, forward ); this.store = store; this.cursor = store.openPageCursorForReading( 0 ); this.record = store.newRecord(); }
@Override public long next() { if ( !hasNext() ) { throw new NoSuchElementException( forward ? format( "ID [%s] has exceeded the high ID [%s] of %s.", id, targetId, store ) : format( "ID [%s] has exceeded the low ID [%s] of %s.", id, targetId, store ) ); } try { return id; } finally { id += forward ? 1 : -1; } } }
Scan( RecordStore<R> store, boolean forward, final Predicate<? super R>... filters ) { this.filters = filters; this.ids = new StoreIdIterator( store, forward ); this.store = store; this.cursor = store.openPageCursorForReading( 0 ); this.record = store.newRecord(); }
@Override public long next() { if ( !hasNext() ) { throw new NoSuchElementException( forward ? format( "ID [%s] has exceeded the high ID [%s] of %s.", id, targetId, store ) : format( "ID [%s] has exceeded the low ID [%s] of %s.", id, targetId, store ) ); } try { return id; } finally { id += forward ? 1 : -1; } } }