@Override public TShortCollection valueCollection() { synchronized (mutex) { if (values == null) values = new TSynchronizedShortCollection(m.valueCollection(), mutex); return values; } }
@Override public TIntSet keySet() { synchronized (mutex) { if (keySet == null) keySet = new TSynchronizedIntSet(m.keySet(), mutex); return keySet; } }
@Override public void putAll(Map<? extends Integer, ? extends Short> map) { synchronized (mutex) { m.putAll(map); } }
@Override public boolean containsValue(short value) { synchronized (mutex) { return m.containsValue(value); } }
@Override public boolean isEmpty() { synchronized (mutex) { return m.isEmpty(); } }
@Override public String toString() { synchronized (mutex) { return m.toString(); } }
@Override public boolean equals(Object o) { synchronized (mutex) { return m.equals(o); } }
@Override public boolean adjustValue(int key, short amount) { synchronized (mutex) { return m.adjustValue(key, amount); } }
@Override public boolean retainEntries(TIntShortProcedure procedure) { synchronized (mutex) { return m.retainEntries(procedure); } }
@Override public int[] keys(int[] array) { synchronized (mutex) { return m.keys(array); } }
@Override public int[] keys() { synchronized (mutex) { return m.keys(); } }
@Override public void clear() { synchronized (mutex) { m.clear(); } }
@Override public void putAll(TIntShortMap map) { synchronized (mutex) { m.putAll(map); } }
@Override public boolean forEachEntry(TIntShortProcedure procedure) { synchronized (mutex) { return m.forEachEntry(procedure); } }
@Override public short[] values() { synchronized (mutex) { return m.values(); } }
@Override public void transformValues(TShortFunction function) { synchronized (mutex) { m.transformValues(function); } }
@Override public short[] values(short[] array) { synchronized (mutex) { return m.values(array); } }
@Override public boolean increment(int key) { synchronized (mutex) { return m.increment(key); } }
@Override public TIntShortIterator iterator() { return m.iterator(); // Must be manually synched by user! }
@Override public short adjustOrPutValue(int key, short adjust_amount, short put_amount) { synchronized (mutex) { return m.adjustOrPutValue(key, adjust_amount, put_amount); } }
// these are unchanging over the life of the map, no need to lock @Override public int getNoEntryKey() { return m.getNoEntryKey(); }
@Override public int hashCode() { synchronized (mutex) { return m.hashCode(); } }
@Override public short getNoEntryValue() { return m.getNoEntryValue(); }
@Override public int size() { synchronized (mutex) { return m.size(); } }
@Override public short putIfAbsent(int key, short value) { synchronized (mutex) { return m.putIfAbsent(key, value); } }
@Override public boolean containsKey(int key) { synchronized (mutex) { return m.containsKey(key); } }
@Override public boolean forEachValue(TShortProcedure procedure) { synchronized (mutex) { return m.forEachValue(procedure); } }
@Override public short get(int key) { synchronized (mutex) { return m.get(key); } }
@Override public short remove(int key) { synchronized (mutex) { return m.remove(key); } }