Fix: public attribute are now private with getter/setter, useless synchronized removed
This commit is contained in:
@@ -63,37 +63,37 @@ public class LimitedMap<K, V> implements Map<K, V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized V remove(Object key) { return map.remove(key); }
|
||||
public V remove(Object key) { return map.remove(key); }
|
||||
|
||||
@Override
|
||||
public synchronized V get(Object key) { return map.get(key); }
|
||||
public V get(Object key) { return map.get(key); }
|
||||
|
||||
@Override
|
||||
public synchronized boolean containsKey(Object key) { return map.containsKey(key); }
|
||||
public boolean containsKey(Object key) { return map.containsKey(key); }
|
||||
|
||||
@Override
|
||||
public synchronized boolean containsValue(Object value) { return map.containsValue(value); }
|
||||
public boolean containsValue(Object value) { return map.containsValue(value); }
|
||||
|
||||
@Override
|
||||
public synchronized int size() { return map.size(); }
|
||||
public int size() { return map.size(); }
|
||||
|
||||
@Override
|
||||
public synchronized boolean isEmpty() { return map.isEmpty(); }
|
||||
public boolean isEmpty() { return map.isEmpty(); }
|
||||
|
||||
@Override
|
||||
public synchronized void putAll(Map<? extends K, ? extends V> m) { m.forEach(this::put); }
|
||||
public void putAll(Map<? extends K, ? extends V> m) { m.forEach(this::put); }
|
||||
|
||||
@Override
|
||||
public synchronized void clear() { map.clear(); }
|
||||
public void clear() { map.clear(); }
|
||||
|
||||
@Override
|
||||
public synchronized Set<K> keySet() { return map.keySet(); }
|
||||
public Set<K> keySet() { return map.keySet(); }
|
||||
|
||||
@Override
|
||||
public synchronized Collection<V> values() { return map.values(); }
|
||||
public Collection<V> values() { return map.values(); }
|
||||
|
||||
@Override
|
||||
public synchronized Set<Entry<K, V>> entrySet() { return map.entrySet(); }
|
||||
public Set<Entry<K, V>> entrySet() { return map.entrySet(); }
|
||||
|
||||
/**
|
||||
* Sets a new size limit for this map.
|
||||
|
||||
Reference in New Issue
Block a user