/** * Returns a predicate that evaluates to {@code true} if the object being tested {@code equals()} * the given target or both are null. */ public static <T> Predicate<T> equalTo(@NullableDecl T target) { return (target == null) ? Predicates.<T>isNull() : new IsEqualToPredicate<T>(target); }