mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
fix code
This commit is contained in:
parent
fcd0d004e3
commit
d83444d336
@ -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));
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import org.apache.poi.xssf.usermodel.XSSFDataValidation;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.dromara.hutool.core.bean.BeanUtil;
|
||||
import org.dromara.hutool.core.collection.ListUtil;
|
||||
import org.dromara.hutool.core.comparator.ArrayIndexedComparator;
|
||||
import org.dromara.hutool.core.comparator.IndexedComparator;
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import org.dromara.hutool.core.io.IoUtil;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
@ -1440,7 +1440,7 @@ public class ExcelWriter extends ExcelBase<ExcelWriter> {
|
||||
Comparator<String> aliasComparator = this.aliasComparator;
|
||||
if (null == aliasComparator) {
|
||||
final Set<String> keySet = this.headerAlias.keySet();
|
||||
aliasComparator = new ArrayIndexedComparator<>(keySet.toArray(new String[0]));
|
||||
aliasComparator = new IndexedComparator<>(keySet.toArray(new String[0]));
|
||||
this.aliasComparator = aliasComparator;
|
||||
}
|
||||
return aliasComparator;
|
||||
|
Loading…
Reference in New Issue
Block a user