Пример #1
0
 @Override
 public V get(Object key) {
   if (key == null) return null;
   myHardKeyInstance.set((K) key);
   V result = myMap.get(myHardKeyInstance);
   myHardKeyInstance.clear();
   return result;
 }
Пример #2
0
 @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;
 }
Пример #3
0
  @Override
  public V remove(@NotNull Object key) {
    processQueue();

    // optimization:
    myHardKeyInstance.set((K) key);
    V result = myMap.remove(myHardKeyInstance);
    myHardKeyInstance.clear();
    return result;
  }