| 程序包 | 说明 |
|---|---|
| cn.hutool.core.collection | |
| cn.hutool.core.lang | |
| cn.hutool.core.lang.copier | |
| cn.hutool.core.map | |
| cn.hutool.core.util |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> Collection<T> |
CollUtil.filter(Collection<T> collection,
Filter<T> filter)
过滤
过滤过程通过传入的Filter实现来过滤返回需要的元素内容,这个Editor实现可以实现以下功能: 1、过滤出需要的对象, accept(Object)方法返回true的对象将被加入结果集合中
|
static <K,V> Map<K,V> |
CollUtil.filter(Map<K,V> map,
Filter<Map.Entry<K,V>> filter)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能: 1、过滤出需要的对象,如果返回null表示这个元素对象抛弃 2、修改元素对象,返回集合中为修改后的对象 |
static <T> T |
CollUtil.findOne(Iterable<T> collection,
Filter<T> filter)
查找第一个匹配元素对象
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Set<Class<?>> |
ClassScaner.scanPackage(String packageName,
Filter<Class<?>> classFilter)
扫面包路径下满足class过滤器条件的所有class文件,
如果包路径为 com.abs + A.class 但是输入 abs会产生classNotFoundException 因为className 应该为 com.abs.A 现在却成为abs.A,此工具类对该异常进行忽略处理,有可能是一个不完善的地方,以后需要进行修改 |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Filter<T> |
SrcToDestCopier.copyFilter
拷贝过滤器,可以过滤掉不需要拷贝的源
|
| 限定符和类型 | 方法和说明 |
|---|---|
Filter<T> |
SrcToDestCopier.getCopyFilter()
获得过滤器
|
| 限定符和类型 | 方法和说明 |
|---|---|
C |
SrcToDestCopier.setCopyFilter(Filter<T> copyFilter)
设置过滤器
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <K,V> Map<K,V> |
MapUtil.filter(Map<K,V> map,
Filter<Map.Entry<K,V>> filter)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能: 1、过滤出需要的对象,如果返回null表示这个元素对象抛弃 2、修改元素对象,返回集合中为修改后的对象 |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T[] |
ArrayUtil.filter(T[] array,
Filter<T> filter)
过滤
过滤过程通过传入的Filter实现来过滤返回需要的元素内容,这个Editor实现可以实现以下功能: 1、过滤出需要的对象, accept(Object)方法返回true的对象将被加入结果集合中
|
static Method[] |
ReflectUtil.getMethods(Class<?> clazz,
Filter<Method> filter)
获得指定类过滤后的Public方法列表
|
static List<Method> |
ClassUtil.getPublicMethods(Class<?> clazz,
Filter<Method> filter)
获得指定类过滤后的Public方法列表
|
static Set<Class<?>> |
ClassUtil.scanPackage(String packageName,
Filter<Class<?>> classFilter)
扫面包路径下满足class过滤器条件的所有class文件,
如果包路径为 com.abs + A.class 但是输入 abs会产生classNotFoundException 因为className 应该为 com.abs.A 现在却成为abs.A,此工具类对该异常进行忽略处理,有可能是一个不完善的地方,以后需要进行修改 |
Copyright © 2018. All rights reserved.