public boolean matches(AccessControlEntry other) {
        if ((principal() != null) && (!principal().equals(other.principal())))
            return false;
        if ((host() != null) && (!host().equals(other.host())))
            return false;
        if ((operation() != AclOperation.ANY) && (!operation().equals(other.operation())))
            return false;
        return (permissionType() == AclPermissionType.ANY) || (permissionType().equals(other.permissionType()));
    }
Returns true if this filter matches the given AccessControlEntry.
clients/src/main/java/org/apache/kafka/common/acl/AccessControlEntryFilter.java