code: @Override
    public int removeAll(KTypePredicate<? super KType> predicate) {
      final int before = size();
  
      if (hasEmptyKey) {
        if (predicate.apply(Intrinsics.<KType> empty())) {
          hasEmptyKey = false;
          values[mask + 1] = Intrinsics.<VType> empty();
        }
      }
  
      final KType[] keys = Intrinsics.<KType[]> cast(this.keys);
      for (int slot = 0, max = this.mask; slot <= max;) {
        KType existing;
        if (!Intrinsics.<KType> isEmpty(existing = keys[slot]) &&
            predicate.apply(existing)) {
          // Shift, do not increment slot.
          shiftConflictingKeys(slot);
        } else {
          slot++;
        }
      }
  
      return before - size();
    }
docs: {@inheritDoc}