Class Predicates

java.lang.Object
io.github.torand.javacommons.functional.Predicates

public final class Predicates extends Object
General purpose predicates for streams.
  • Method Details

    • instanceOf

      public static <T> Predicate<? super T> instanceOf(Class<? extends T> clazz)
      Creates a predicate testing whether an object is an instance of a specified class.
      Type Parameters:
      T - the class type.
      Parameters:
      clazz - the class to test instance on.
      Returns:
      the predicate.