RecordBuffer extends BufferBase { public int find(Record k) { return find(k, 0, numSlot); } RecordBuffer(RecordFactory recFactory, int maxRec);  RecordBuffer(ByteBuffer bb, RecordFactory recFactory, int num); X access(int idx, byte[] key, RecordMapper<X> mapper); Record get(int idx); Record getLow(); Record getHigh(); void add(Record record); void add(int idx, Record record); void set(int idx, Record record); X _access(int idx, byte[] key, RecordMapper<X> mapper); Record _get(int idx); int find(Record k); Iterator<Record> iterator(); Iterator<Record> iterator(Record min, Record max); Iterator<X> iterator(Record min, Record max, RecordMapper<X> mapper); Record findGet(Record k); boolean removeByKey(Record k); int find(Record rec, int fromIndex, int toIndex); @Override String toString(); RecordBuffer duplicate();  }
@Test public void recBuffer02() { RecordBuffer rb = make(4, 4); int idx = -1; idx = find(rb, 6); assertEquals(2, idx); idx = find(rb, 8); assertEquals(3, idx); idx = find(rb, 4); assertEquals(1, idx); idx = find(rb, 2); assertEquals(0, idx); idx = find(rb, 3); assertEquals(-2, idx); idx = find(rb, 0); assertEquals(-1, idx); idx = find(rb, 10); assertEquals(-5, idx); }