class FairQueue implements BlockingQueue<E> {

   @Override
   public boolean retainAll (Collection<?> c)
   {
      boolean modified = false;
      List<Object> removeKeys = new ArrayList<Object> ();
      for (Object key : keys)
      {
         boolean res = storage.get (key).retainAll (c);
         modified = modified || res;
         if (storage.get (key).isEmpty ())
         {
            storage.remove (key);
            removeKeys.add (key);
         }
      }
      keys.removeAll(removeKeys);
      int ct = 0;
      for (Object key : keys)
      {
         ct += storage.get (key).size ();
      }
      count.set (ct);
      return modified;
   }

   public  FairQueue();

}