class CollectionFunctions {

    @SafeVarargs
    public static <T> Predicate<T> and(Predicate<? super T>... predicates){
        return t -> {
            for (Predicate<? super T> predicate : predicates){
                if (!predicate.test(t)){
                    return false;
                }
            }
            return true;
        };
    }

    private  CollectionFunctions();

}