@SuppressWarnings("unchecked")
        static <T> SocketPredicate typeAnd(final Class<T> type, final Predicate<T> condition) {
            requireNonNull(type, "type");
            requireNonNull(condition, "condition");
            return s -> type.isInstance(s) && condition.test((T) s);
        }
Checks the type of the socket address and the given condition.

@param <T> The expected type of the socket address.
@param type The expected class of the socket address.
@param condition The additional condition the socket has to pass.
@return The newly created socket predicate.
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicate.java