MCPcopy
hub / github.com/google/guava / instanceOf

Method instanceOf

guava/src/com/google/common/base/Predicates.java:210–213  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 9

filterMethod · 0.95
assertTaskWrappedMethod · 0.95
filterMethod · 0.45
toStringMethod · 0.45

Calls

no outgoing calls