public String toString() { // Cleanup stale entries first, so as not to allocate a larger than // necessary StringBuffer. cleanup(); return WeakIdentityMap.toString(this); }
public void clear() { ReferencedValueHashMap.this.clear(); } public String toString() {
public boolean remove(Object o) { if (o == null) { if (ReferencedValueHashMap.this.containsKey(null)) { ReferencedValueHashMap.this.remove(null); return true; } else { return false; } } else { return ReferencedValueHashMap.this.remove(o) != null; } } public void clear() {
public void putAll(Map<? extends K, ? extends V> t) { Iterator i = t.entrySet().iterator(); while (i.hasNext()) { Map.Entry<K, V> e = (Map.Entry<K, V>) i.next(); put(e.getKey(), e.getValue()); } }
/** * Constructs a new map with the same mappings as the given map. The * map is created with a capacity of twice the number of mappings in * the given map or 11 (whichever is greater), and a default load factor, * which is <tt>0.75</tt>. */ public ReferencedValueHashMap(Map<? extends K, ? extends V> t) { this(Math.max(2 * t.size(), 11), 0.75f); putAll(t); }
public boolean contains(Object o) { return containsKey(o); } public boolean remove(Object o) {
public boolean contains(Object o) { return containsValue(o); } public void clear() {
public void putAll(Map<? extends K, ? extends V> t) { Iterator i = t.entrySet().iterator(); while (i.hasNext()) { Map.Entry<K, V> e = (Map.Entry<K, V>) i.next(); put(e.getKey(), e.getValue()); } }
/** * Constructs a new map with the same mappings as the given map. The * map is created with a capacity of twice the number of mappings in * the given map or 11 (whichever is greater), and a default load factor, * which is <tt>0.75</tt>. */ public ReferencedValueHashMap(Map<? extends K, ? extends V> t) { this(Math.max(2 * t.size(), 11), 0.75f); putAll(t); }
public boolean contains(Object o) { return containsKey(o); } public boolean remove(Object o) {
public boolean contains(Object o) { return containsValue(o); } public void clear() {
public boolean remove(Object o) { if (o == null) { if (ReferencedValueHashMap.this.containsKey(null)) { ReferencedValueHashMap.this.remove(null); return true; } else { return false; } } else { return ReferencedValueHashMap.this.remove(o) != null; } } public void clear() {
public void clear() { ReferencedValueHashMap.this.clear(); } public String toString() {
public String toString() { // Cleanup stale entries first, so as not to allocate a larger than // necessary StringBuffer. cleanup(); return WeakIdentityMap.toString(this); }
public void clear() { ReferencedValueHashMap.this.clear(); } public String toString() {
public void clear() { ReferencedValueHashMap.this.clear(); } public String toString() {