public static void putAll(final InternalFloatFloatMapOps map, Map<? extends Float, ? extends Float> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof FloatFloatMap) { if (another instanceof InternalFloatFloatMapOps) { ((InternalFloatFloatMapOps) another).reversePutAllTo(map); } else { ((FloatFloatMap) another).forEach(new FloatFloatConsumer() { @Override public void accept(float key, float value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Float, ? extends Float> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }
public static void putAll(final InternalFloatFloatMapOps map, Map<? extends Float, ? extends Float> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof FloatFloatMap) { if (another instanceof InternalFloatFloatMapOps) { ((InternalFloatFloatMapOps) another).reversePutAllTo(map); } else { ((FloatFloatMap) another).forEach(new FloatFloatConsumer() { @Override public void accept(float key, float value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Float, ? extends Float> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }