Class Fn.Predicates

java.lang.Object
com.landawn.abacus.util.Fn.Predicates
Enclosing class:
Fn

public static final class Fn.Predicates extends Object
The Class Predicates.
  • Method Details

    • indexed

      @Beta @SequentialOnly @Stateful public static <T> Predicate<T> indexed(IndexedPredicate<T> predicate)
      Returns a stateful Predicate. Don't save or cache for reuse or use it in parallel stream.
      Type Parameters:
      T -
      Parameters:
      predicate -
      Returns:
    • distinct

      @Beta @SequentialOnly @Stateful public static <T> Predicate<T> distinct()
      Returns a stateful Predicate. Don't save or cache for reuse or use it in parallel stream.
      Type Parameters:
      T -
      Returns:
    • distinctBy

      @Beta @SequentialOnly @Stateful public static <T> Predicate<T> distinctBy(Function<? super T,?> mapper)
      Returns a stateful Predicate. Don't save or cache for reuse or use it in parallel stream.
      Type Parameters:
      T -
      Parameters:
      mapper -
      Returns:
    • concurrentDistinct

      @Beta @SequentialOnly @Stateful public static <T> Predicate<T> concurrentDistinct()
      Returns a stateful Predicate. Don't save or cache for reuse or use it in parallel stream.
      Type Parameters:
      T -
      Returns:
    • concurrentDistinctBy

      @Beta @SequentialOnly @Stateful public static <T> Predicate<T> concurrentDistinctBy(Function<? super T,?> mapper)
      Returns a stateful Predicate. Don't save or cache for reuse or use it in parallel stream.
      Type Parameters:
      T -
      Parameters:
      mapper -
      Returns:
    • skipRepeats

      @Beta @SequentialOnly @Stateful public static <T> Predicate<T> skipRepeats()
      Returns a stateful Predicate. Don't save or cache for reuse or use it in parallel stream. Remove the continuous repeat elements.
      Type Parameters:
      T -
      Returns: