RecordBuffer extends BufferBase { public void set(int idx, Record record) { if ( idx == numSlot ) { add(idx, record) ; return ; } else checkBounds(idx, numSlot) ; _set(idx, record) ; } RecordBuffer(RecordFactory recFactory, int maxRec);  RecordBuffer(ByteBuffer bb, RecordFactory recFactory, int num); Record get(int idx); Record getLow(); Record getHigh(); void add(Record record); void add(int idx, Record record); void set(int idx, Record record); Record _get(int idx); int find(Record k); Iterator<Record> iterator(); Iterator<Record> iterator(Record min, Record max); Record findGet(Record k); boolean removeByKey(Record k); int find(Record rec, int fromIndex, int toIndex); @Override String toString(); RecordBuffer duplicate();  }
@Test public void recBuffer03() { RecordBuffer rb = make(4,5) ; contains(rb, 2, 4, 6, 8) ; rb.shiftUp(0) ; rb.set(0, r(0)) ; contains(rb, 0, 2, 4, 6, 8) ; rb.shiftDown(0) ; contains(rb, 2, 4, 6, 8) ; }
@Test public void recBuffer04() { RecordBuffer rb = make(4,5) ; contains(rb, 2, 4, 6, 8) ; rb.shiftDown(0) ; contains(rb, 4, 6, 8) ; rb.shiftUp(0) ; rb.set(0,r(1)) ; contains(rb, 1, 4, 6, 8) ; }
@Test public void recBuffer05() { RecordBuffer rb = make(4,5) ; contains(rb, 2, 4, 6, 8) ; rb.shiftUp(2) ; rb.set(2, r(0)) ; contains(rb, 2, 4, 0, 6, 8) ; rb.shiftDown(2) ; contains(rb, 2, 4, 6, 8) ; }
@Test public void recBuffer07() { RecordBuffer rb = make(4,5) ; contains(rb, 2, 4, 6, 8) ; rb.shiftUp(3) ; rb.set(3, r(1)) ; contains(rb, 2, 4, 6, 1, 8) ; rb.shiftDown(3) ; contains(rb, 2, 4, 6, 8) ; }