Returns a predicate that evaluates to {@code true} if the object being tested is an instance of the given class. If the object being tested is {@code null} this predicate evaluates to {@code false}. <p>If you want to filter an {@code Iterable} to narrow its type, consider using {@link com.google.co
(Class<?> clazz)
| 208 | * and are not serializable. |
| 209 | */ |
| 210 | @GwtIncompatible // Class.isInstance |
| 211 | public static <T extends @Nullable Object> Predicate<T> instanceOf(Class<?> clazz) { |
| 212 | return new InstanceOfPredicate<>(clazz); |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Returns a predicate that evaluates to {@code true} if the class being tested is assignable to |
no outgoing calls