equal
deleted
inserted
replaced
250 * @param m the map whose mappings are to be placed in this map |
250 * @param m the map whose mappings are to be placed in this map |
251 * @throws NullPointerException if the specified map is null |
251 * @throws NullPointerException if the specified map is null |
252 * @since 1.3 |
252 * @since 1.3 |
253 */ |
253 */ |
254 public WeakHashMap(Map<? extends K, ? extends V> m) { |
254 public WeakHashMap(Map<? extends K, ? extends V> m) { |
255 this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1, |
255 this(Math.max((int) ((float)m.size() / DEFAULT_LOAD_FACTOR + 1.0F), |
256 DEFAULT_INITIAL_CAPACITY), |
256 DEFAULT_INITIAL_CAPACITY), |
257 DEFAULT_LOAD_FACTOR); |
257 DEFAULT_LOAD_FACTOR); |
258 putAll(m); |
258 putAll(m); |
259 } |
259 } |
260 |
260 |