public final class StreamUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Comparator<java.lang.String> |
comparatorByList(java.util.List<java.lang.String> order)
Get a comparator that sorts according to the provided list.
|
static <T> java.util.Comparator<T> |
localeComparator(java.util.function.Function<? super T,? extends java.lang.String> keyExtractor)
Get a comparator that compares based on PRIMARY differences with the
current default locale.
|
static <T> java.util.function.Predicate<T> |
patternFilter(java.lang.String regex,
java.util.function.Function<T,java.lang.String> stringExtractor) |
public static <T> java.util.Comparator<T> localeComparator(java.util.function.Function<? super T,? extends java.lang.String> keyExtractor)
keyExtractor
- Function for obtaining strings that the Collator
can
comparepublic static java.util.Comparator<java.lang.String> comparatorByList(java.util.List<java.lang.String> order)
public static <T> java.util.function.Predicate<T> patternFilter(java.lang.String regex, java.util.function.Function<T,java.lang.String> stringExtractor)