| 程序包 | 说明 |
|---|---|
| cn.hutool.core.collection |
集合以及Iterator封装,包括集合工具CollUtil,Iterator和Iterable工具IterUtil
|
| cn.hutool.core.util |
提供各种工具方法,按照归类入口为XXXUtil,如字符串工具StrUtil等
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> int |
CollUtil.count(Iterable<T> iterable,
Matcher<T> matcher)
集合中匹配规则的数量
|
static <T> int[] |
CollUtil.indexOfAll(Collection<T> collection,
Matcher<T> matcher)
获取匹配规则定义中匹配到元素的所有位置
此方法对于某些无序集合的位置信息,以转换为数组后的位置为准。 |
static <T> int[] |
ListUtil.indexOfAll(List<T> list,
Matcher<T> matcher)
获取匹配规则定义中匹配到元素的所有位置
|
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
StrUtil.isAllCharMatch(CharSequence value,
Matcher<Character> matcher)
字符串的每一个字符是否都与定义的匹配器匹配
|
Copyright © 2020. All rights reserved.