Class StreamUtils

java.lang.Object
com.sportradar.utils.StreamUtils

public class StreamUtils extends Object
Generic stream utility methods
  • Method Details

    • distinctObjects

      public static <T> Predicate<T> distinctObjects(Function<? super T,?> keyExtractor)
      Utility method used to filter out objects by some parameter
      Type Parameters:
      T - the objects type
      Parameters:
      keyExtractor - the provider of the parameter on which to distinct the objects
      Returns:
      true if the object was already filtered, otherwise false