public final boolean execute(float key) { h += _hashingStrategy.computeHashCode(key); return true; } }
/** * Locates the index of <tt>val</tt>. * * @param val an <code>float</code> value * @return the index of <tt>val</tt> or -1 if it isn't in the set. */ protected int index(float val) { int hash, probe, index, length; float[] 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; }
set = _set; length = states.length; hash = _hashingStrategy.computeHashCode(val) & 0x7fffffff; index = hash % length;
public final boolean execute(float key, double value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(float key, float value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(float key, int value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(float key, Object value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }
public final boolean execute(float key, long value) { h += (_hashingStrategy.computeHashCode(key) ^ HashFunctions.hash(value)); return true; } }