mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix readBySax for xls not support sheetName
This commit is contained in:
@@ -686,6 +686,29 @@ public class CollUtilTest {
|
||||
Assert.assertEquals(Integer.valueOf(1), countMap.get("d"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void indexOfTest() {
|
||||
ArrayList<String> list = CollUtil.newArrayList("a", "b", "c", "c", "a", "b", "d");
|
||||
final int i = CollUtil.indexOf(list, (str) -> str.charAt(0) == 'c');
|
||||
Assert.assertEquals(2, i);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void lastIndexOfTest() {
|
||||
// List有优化
|
||||
ArrayList<String> list = CollUtil.newArrayList("a", "b", "c", "c", "a", "b", "d");
|
||||
final int i = CollUtil.lastIndexOf(list, (str) -> str.charAt(0) == 'c');
|
||||
Assert.assertEquals(3, i);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void lastIndexOfSetTest() {
|
||||
Set<String> list = CollUtil.set(true, "a", "b", "c", "c", "a", "b", "d");
|
||||
// 去重后c排第三
|
||||
final int i = CollUtil.lastIndexOf(list, (str) -> str.charAt(0) == 'c');
|
||||
Assert.assertEquals(2, i);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pageTest(){
|
||||
List<Dict> objects = CollUtil.newArrayList();
|
||||
|
Reference in New Issue
Block a user