@Override public V get(Object key) { if (key == null) return null; myHardKeyInstance.set((K) key); V result = myMap.get(myHardKeyInstance); myHardKeyInstance.clear(); return result; }
@Override public boolean containsKey(Object key) { if (key == null) return false; // optimization: myHardKeyInstance.set((K) key); boolean result = myMap.containsKey(myHardKeyInstance); myHardKeyInstance.clear(); return result; }
@Override public V remove(@NotNull Object key) { processQueue(); // optimization: myHardKeyInstance.set((K) key); V result = myMap.remove(myHardKeyInstance); myHardKeyInstance.clear(); return result; }