public static int compareByKey(Record record1, Record record2) { checkKeyCompatible(record1, record2) ; return Bytes.compare(record1.key, record2.key) ; }
public static int compareByKey(Record record1, Record record2) { checkKeyCompatible(record1, record2) ; return Bytes.compare(record1.key, record2.key) ; }
public static int compareByKey(Record record1, Record record2) { checkKeyCompatible(record1, record2) ; return Bytes.compare(record1.key, record2.key) ; }
@Override public boolean contains(Record record) { Record r = find(record) ; if ( r == null ) return false ; if ( ! recordFactory.hasValue() ) return true ; return Bytes.compare(record.getValue(), r.getValue()) == 0 ; }
@Override public boolean contains(Record record) { Record r = find(record) ; if ( r == null ) return false ; if ( ! recordFactory.hasValue() ) return true ; return Bytes.compare(record.getValue(), r.getValue()) == 0 ; }
@Override public boolean contains(Record record) { Record r = find(record) ; if ( r == null ) return false ; if ( ! recordFactory.hasValue() ) return true ; return Bytes.compare(record.getValue(), r.getValue()) == 0 ; }
@Override public boolean contains(Record record) { Record r = find(record) ; if ( r == null ) return false ; if ( !recordFactory.hasValue() ) return true ; return Bytes.compare(record.getValue(), r.getValue()) == 0 ; }
@Override public boolean hasNext() { if ( slot != null ) return true ; if ( nextIdx < 0 ) return false ; if ( nextIdx >= rBuff.size() ) { finish() ; return false ; } slot = rBuff.access(nextIdx, keySlot, mapper); if ( maxRec != null && Bytes.compare(keySlot, maxRec.getKey()) >= 0 ) { // Finished - now to large finish() ; return false ; } nextIdx ++ ; return true ; }
private static void compare(int expected, byte[] b1, byte[] b2) { int x = Bytes.compare(b1, b2) ; if ( x > 0 && expected > 0 ) return ; if ( x == 0 && expected == 0 ) return ; if ( x < 0 && expected < 0 ) return ; fail("Does not compare: "+Bytes.asHex(b1)+" :: "+Bytes.asHex(b2)) ; }
currentIdx++ ; if ( maxRec != null && Bytes.compare(keySlot, maxRec.getKey()) >= 0 ) { close() ; return false ;
currentIdx++ ; if ( maxRec != null && Bytes.compare(keySlot, maxRec.getKey()) >= 0 ) { close() ; return false ;