This commit is contained in:
Looly
2024-07-30 15:17:22 +08:00
parent fcd0d004e3
commit d83444d336
2 changed files with 3 additions and 3 deletions

View File

@@ -335,7 +335,7 @@ public class CompareUtil {
@SuppressWarnings("unchecked")
public static <T, U> Comparator<T> comparingIndexed(final Function<? super T, ? extends U> keyExtractor, final boolean atEndIfMiss, final U... objs) {
Objects.requireNonNull(keyExtractor);
final ArrayIndexedComparator<U> indexedComparator = new ArrayIndexedComparator<>(atEndIfMiss, objs);
final IndexedComparator<U> indexedComparator = new IndexedComparator<>(atEndIfMiss, objs);
return (o1, o2) -> indexedComparator.compare(keyExtractor.apply(o1), keyExtractor.apply(o2));
}