public boolean isEmpty() { if (!checkInitializedRead()) return true; return getCollection().isEmpty(); }
public V remove(Object key) { checkInitializedWrite(); boolean containsKey = getCollection().containsKey(key); V removedValue = getCollection().remove(key); if (containsKey) dirty(); return removedValue; }
public V put(K key, V value) { return put(key, value, true); }
public void putAll(Map<? extends K, ? extends V> m) { checkInitializedWrite(); for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) put(entry.getKey(), entry.getValue(), false); }
public void putAll(Map<? extends K, ? extends V> m) { checkInitializedWrite(); for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) put(entry.getKey(), entry.getValue(), false); }
public boolean isEmpty() { if (!checkInitializedRead()) return true; return getCollection().isEmpty(); }
public void clear() { checkInitializedWrite(); if (!getCollection().isEmpty()) { getCollection().clear(); dirty(); } }
public void putAll(Map<? extends K, ? extends V> m) { checkInitializedWrite(); for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) put(entry.getKey(), entry.getValue(), false); }
public V put(K key, V value) { return put(key, value, true); }
public V get(Object key) { if (!checkInitializedRead()) return null; return getCollection().get(key); }
public void clear() { checkInitializedWrite(); if (!getCollection().isEmpty()) { getCollection().clear(); dirty(); } }
public V put(K key, V value) { return put(key, value, true); }
public V get(Object key) { if (!checkInitializedRead()) return null; return getCollection().get(key); }
public V remove(Object key) { checkInitializedWrite(); boolean containsKey = getCollection().containsKey(key); V removedValue = getCollection().remove(key); if (containsKey) dirty(); return removedValue; }
public boolean containsValue(Object value) { if (!checkInitializedRead()) return false; return getCollection().containsValue(value); }
public void clear() { checkInitializedWrite(); if (!getCollection().isEmpty()) { getCollection().clear(); dirty(); } }
public int size() { if (!checkInitializedRead()) return 0; return getCollection().size(); }
protected V put(K key, V value, boolean checkInitialized) { if (checkInitialized) checkInitializedWrite(); boolean containsKey = getCollection().containsKey(key); V previousValue = getCollection().put(key, value); if (!containsKey || (previousValue == null ? value != null : !previousValue.equals(value))) dirty(); return previousValue; }
public boolean containsValue(Object value) { if (!checkInitializedRead()) return false; return getCollection().containsValue(value); }
protected V put(K key, V value, boolean checkInitialized) { if (checkInitialized) checkInitializedWrite(); boolean containsKey = getCollection().containsKey(key); V previousValue = getCollection().put(key, value); if (!containsKey || (previousValue == null ? value != null : !previousValue.equals(value))) dirty(); return previousValue; }