예제 #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;
  }