/** * Factory to create the comparator predicate * * @param <T> the type that the predicate queries * @param object the object to compare to * @param comparator the comparator to use for comparison * @return the predicate * @throws NullPointerException if comparator is null */ public static <T> Predicate<T> comparatorPredicate(final T object, final Comparator<T> comparator) { return comparatorPredicate(object, comparator, Criterion.EQUAL); }