/** * Returns the ID integer of given value. In case of not found - if * roundingFlag=0, throw IllegalArgumentException; - if roundingFlag<0, the * closest smaller ID integer if exist; - if roundingFlag>0, the closest * bigger ID integer if exist. The implementation often has cache, thus * faster than the byte[] version getIdFromValueBytes() * * @throws IllegalArgumentException * if value is not found in dictionary and rounding is off or * failed */ final public int getIdFromValue(T value, int roundingFlag) { if (isNullObjectForm(value)) return nullId(); else return getIdFromValueImpl(value, roundingFlag); }
/** * A lower level API, return ID integer from raw value bytes. In case of not * found - if roundingFlag=0, throw IllegalArgumentException; - if * roundingFlag<0, the closest smaller ID integer if exist; - if * roundingFlag>0, the closest bigger ID integer if exist. Bypassing the * cache layer, this could be significantly slower than getIdFromValue(T * value). * * @throws IllegalArgumentException * if value is not found in dictionary and rounding is off or * failed */ final public int getIdFromValueBytes(byte[] value, int offset, int len, int roundingFlag) { if (isNullByteForm(value, offset, len)) return nullId(); else return getIdFromValueBytesImpl(value, offset, len, roundingFlag); }
idInMergedDict = mergedDict.nullId(); } else { idInMergedDict = mergedDict.getIdFromValueBytes(newKeyBuf, bufOffset, size);