boolean processQueue() {
    boolean processed = false;

    while (true) {
      //noinspection unchecked
      ValueReference<K, V> ref = (ValueReference<K, V>)myQueue.poll();
      if (ref == null) break;
      K key = ref.getKey();
      if (myMap.remove(key, ref) && myEvictionListener != null) {
        myEvictionListener.accept(this, key);
      }
      processed = true;
    }
    return processed;
  }
boolean processQueue()