public final boolean execute(long key) { h += _hashingStrategy.computeHashCode(key); return true; } }
public final boolean execute(long key) { h += _hashingStrategy.computeHashCode(key); return true; } }
/** * Locates the index of <tt>val</tt>. * * @param val an <code>long</code> value * @return the index of <tt>val</tt> or -1 if it isn't in the set. */ protected int index(long val) { int hash, probe, index, length; long[] set; byte[] states; states = _states; set = _set; length = states.length; hash = _hashingStrategy.computeHashCode(val) & 0x7fffffff; index = hash % length; if (states[index] != FREE && (states[index] == REMOVED || set[index] != val)) { // see Knuth, p. 529 probe = 1 + (hash % (length - 2)); do { index -= probe; if (index < 0) { index += length; } } while (states[index] != FREE && (states[index] == REMOVED || set[index] != val)); } return states[index] == FREE ? -1 : index; }
/** * Locates the index of <tt>val</tt>. * * @param val an <code>long</code> value * @return the index of <tt>val</tt> or -1 if it isn't in the set. */ protected int index(long val) { int hash, probe, index, length; long[] set; if (val == this._FREE) { return -1; } set = _set; length = set.length; hash = _hashingStrategy.computeHashCode(val) & 0x7fffffff; index = hash % length; if (set[index] != this._FREE && set[index] != val) { // see Knuth, p. 529 probe = 1 + (hash % (length - 2)); do { index -= probe; if (index < 0) { index += length; } } while (set[index] != this._FREE && set[index] != val); } return set[index] == this._FREE ? -1 : index; }
set = _set; length = states.length; hash = _hashingStrategy.computeHashCode(val) & 0x7fffffff; index = hash % length;
public final boolean execute(long key, Object value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(long key, double value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(long key, Object value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(long key, long value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(long key, int value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(long key, float value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
hash = _hashingStrategy.computeHashCode(val) & 0x7fffffff; index = hash % length;