List of usage examples for java.util WeakHashMap WeakHashMap
public WeakHashMap(Map<? extends K, ? extends V> m)
From source file:org.jiemamy.utils.collection.CollectionsUtil.java
/** * {@link WeakHashMap}?????//from w w w. j a v a 2 s . co m * * @param <K> {@link WeakHashMap}?? * @param <V> {@link WeakHashMap}?? * @param initialCapacity ?? * @return {@link WeakHashMap}??? * @throws IllegalArgumentException If the initial capacity is negative. * @see WeakHashMap#WeakHashMap(int) */ public static <K, V> WeakHashMap<K, V> newWeakHashMap(int initialCapacity) { return new WeakHashMap<K, V>(initialCapacity); }
From source file:org.jiemamy.utils.collection.CollectionsUtil.java
/** * {@link WeakHashMap}?????/* ww w . j a va2 s . co m*/ * * @param <K> {@link WeakHashMap}?? * @param <V> {@link WeakHashMap}?? * @param m ????? * @return {@link WeakHashMap}??? * @throws IllegalArgumentException ?{@code null}??? * @see WeakHashMap#WeakHashMap(Map) */ public static <K, V> WeakHashMap<K, V> newWeakHashMap(Map<? extends K, ? extends V> m) { Validate.notNull(m); return new WeakHashMap<K, V>(m); }