private static boolean matches(ClientQuotaEntity entity,
                                   Map<String, String> exactMatch,
                                   Set<String> typeMatch,
                                   boolean strict) {
        if (strict) {
            if (entity.entries().size() != exactMatch.size() + typeMatch.size()) {
                return false;
            }
        }
        for (Entry<String, String> entry : exactMatch.entrySet()) {
            if (!entity.entries().containsKey(entry.getKey())) {
                return false;
            }
            if (!Objects.equals(entity.entries().get(entry.getKey()), entry.getValue())) {
                return false;
            }
        }
        for (String type : typeMatch) {
            if (!entity.entries().containsKey(type)) {
                return false;
            }
        }
        return true;
    }
Represents the client quotas in the metadata image.

This class is thread-safe.
metadata/src/main/java/org/apache/kafka/image/ClientQuotasImage.java