Guava migration - Inline Predicates.equalTo

This commit is contained in:
Jetz
2024-09-03 08:54:18 -04:00
parent 4eb8fddfef
commit 6b96bca83f
5 changed files with 6 additions and 11 deletions

View File

@@ -37,10 +37,4 @@ public class Predicates {
//TODO: remove casting?
return ((Predicate<T>) first).or(second);
}
//TODO: This one probably needs case by case; nullable targets need a safe test, whereas nonnull targets can be simplified further.
public static <T> Predicate<T> equalTo(T target) {
return x -> Objects.equals(target, x);
}
}