code: public void dropElementsBelowThreshold(double threshold) {
          Iterator<T> iterator = keySet().iterator();
          while (iterator.hasNext()) {
              T element  = iterator.next();
              double val = map.get(element).get();
              if (val < threshold) {
                  iterator.remove();
                  dirty.set(true);
              }
          }
  
      }
docs: This method will remove all elements with counts below given threshold from counter
  @param threshold