/** * Default implementation of TShortHashingStrategy: delegates hashing to * HashFunctions.hash(short). * * @param val the value to hash * @return the hashcode. */ public final int computeHashCode(short val) { return HashFunctions.hash(val); } } // TShortHash
/** * Default implementation of TIntHashingStrategy: delegates hashing to HashFunctions.hash(int). * * @param val the value to hash * @return the hashcode. */ public final int computeHashCode(int val) { return HashFunctions.hash(val); } } // TIntHash
public int hashCode() { int h = 0; for (int i = _pos; i-- > 0; ) { h += HashFunctions.hash(_data[i]); } return h; }
public int hashCode() { int h = 0; for (int i = _pos; i-- > 0; ) { h += HashFunctions.hash(_data[i]); } return h; }
/** * Default implementation of TLongHashingStrategy: delegates hashing to * HashFunctions.hash(long). * * @param val the value to hash * @return the hashcode. */ public final int computeHashCode(long val) { return HashFunctions.hash(val); } } // TLongHash
public final boolean execute(short key, long value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }