/** * Returns <tt>true</tt> if the receiver contains the specified value. * * @return <tt>true</tt> if the receiver contains the specified value. */ public boolean containsValue(final float value) { return !forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short iterKey, float iterValue) { return (value != iterValue); } } ); }
/** * Assigns the result of a function to each value; <tt>v[i] = function(v[i])</tt>. * * @param function a function object taking as argument the current association's value. */ public void assign(final FloatFunction function) { copy().forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short key, float value) { put(key, function.apply(value)); return true; } } ); }
/** * Clears the receiver, then adds all (key,value) pairs of <tt>other</tt>values to it. * * @param other the other map to be copied into the receiver. */ public void assign(AbstractShortFloatMap other) { clear(); other.forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short key, float value) { put(key, value); return true; } } ); }
public int hashCode() { final int[] buf = new int[size()]; forEachPair( new ShortFloatProcedure() { int i = 0; @Override public boolean apply(short key, float value) { buf[i++] = HashUtils.hash(key) ^ HashUtils.hash(value); return true; } } ); Arrays.sort(buf); return IntBuffer.wrap(buf).hashCode(); }
forEachPair( new ShortFloatProcedure() { @Override other.forEachPair( new ShortFloatProcedure() { @Override
valueList.clear(); forEachPair( new ShortFloatProcedure() { @Override
/** * Returns <tt>true</tt> if the receiver contains the specified value. * * @return <tt>true</tt> if the receiver contains the specified value. */ public boolean containsValue(final float value) { return !forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short iterKey, float iterValue) { return (value != iterValue); } } ); }
/** * Returns <tt>true</tt> if the receiver contains the specified value. * * @return <tt>true</tt> if the receiver contains the specified value. */ public boolean containsValue(final float value) { return !forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short iterKey, float iterValue) { return (value != iterValue); } } ); }
/** * Clears the receiver, then adds all (key,value) pairs of <tt>other</tt>values to it. * * @param other the other map to be copied into the receiver. */ public void assign(AbstractShortFloatMap other) { clear(); other.forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short key, float value) { put(key, value); return true; } } ); }
/** * Assigns the result of a function to each value; <tt>v[i] = function(v[i])</tt>. * * @param function a function object taking as argument the current association's value. */ public void assign(final FloatFunction function) { copy().forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short key, float value) { put(key, function.apply(value)); return true; } } ); }
/** * Assigns the result of a function to each value; <tt>v[i] = function(v[i])</tt>. * * @param function a function object taking as argument the current association's value. */ public void assign(final FloatFunction function) { copy().forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short key, float value) { put(key, function.apply(value)); return true; } } ); }
/** * Clears the receiver, then adds all (key,value) pairs of <tt>other</tt>values to it. * * @param other the other map to be copied into the receiver. */ public void assign(AbstractShortFloatMap other) { clear(); other.forEachPair( new ShortFloatProcedure() { @Override public boolean apply(short key, float value) { put(key, value); return true; } } ); }
forEachPair( new ShortFloatProcedure() { @Override other.forEachPair( new ShortFloatProcedure() { @Override
public int hashCode() { final int[] buf = new int[size()]; forEachPair( new ShortFloatProcedure() { int i = 0; @Override public boolean apply(short key, float value) { buf[i++] = HashUtils.hash(key) ^ HashUtils.hash(value); return true; } } ); Arrays.sort(buf); return IntBuffer.wrap(buf).hashCode(); }
valueList.clear(); forEachPair( new ShortFloatProcedure() { @Override
valueList.clear(); forEachPair( new ShortFloatProcedure() { @Override
forEachPair( new ShortFloatProcedure() { @Override