Package com.landawn.abacus.util
Class Fn.Predicates
java.lang.Object
com.landawn.abacus.util.Fn.Predicates
- Enclosing class:
- Fn
The Class Predicates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T>
Returns a statefulPredicate
.static <T> Predicate<T>
concurrentDistinctBy
(Function<? super T, ?> mapper) Returns a statefulPredicate
.static <T> Predicate<T>
distinct()
Returns a statefulPredicate
.static <T> Predicate<T>
distinctBy
(Function<? super T, ?> mapper) Returns a statefulPredicate
.static <T> Predicate<T>
indexed
(IndexedPredicate<T> predicate) Returns a statefulPredicate
.static <T> Predicate<T>
Returns a statefulPredicate
.
-
Method Details
-
indexed
@Beta @SequentialOnly @Stateful public static <T> Predicate<T> indexed(IndexedPredicate<T> predicate) Returns a statefulPredicate
. Don't save or cache for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
predicate
-- Returns:
-
distinct
Returns a statefulPredicate
. 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 statefulPredicate
. Don't save or cache for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
concurrentDistinct
Returns a statefulPredicate
. 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 statefulPredicate
. Don't save or cache for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
skipRepeats
Returns a statefulPredicate
. Don't save or cache for reuse or use it in parallel stream. Remove the continuous repeat elements.- Type Parameters:
T
-- Returns:
-