Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
  @Override
  public V remove(@NotNull Object key) {
    processQueue();

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