| Package | Description |
|---|---|
| org.aoju.bus.core.utils |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
BeanUtils.beanToMap(Object bean,
Map<String,Object> targetMap,
boolean ignoreNullValue,
Editor<String> keyEditor)
对象转Map
通过实现
Editor 可以自定义字段值,如果这个Editor返回null则忽略这个字段,以便实现: |
static Map<String,Object> |
ClassUtils.beanToMap(Object bean,
Map<String,Object> targetMap,
boolean ignoreNullValue,
Editor<String> keyEditor)
对象转Map
通过实现
Editor 可以自定义字段值,如果这个Editor返回null则忽略这个字段,以便实现: |
static List<Object> |
CollUtils.extract(Iterable<?> collection,
Editor<Object> editor)
通过Editor抽取集合元素中的某些值返回为新列表
例如提供的是一个Bean列表,通过Editor接口实现获取某个字段值,返回这个字段值组成的新列表
|
static <T> Collection<T> |
CollUtils.filter(Collection<T> collection,
Editor<T> editor)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能:
|
static <T> List<T> |
CollUtils.filter(List<T> list,
Editor<T> editor)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能:
|
static <K,V> Map<K,V> |
CollUtils.filter(Map<K,V> map,
Editor<Map.Entry<K,V>> editor)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能:
|
static <K,V> Map<K,V> |
MapUtils.filter(Map<K,V> map,
Editor<Map.Entry<K,V>> editor)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能:
|
static <T> T[] |
ArrayUtils.filter(T[] array,
Editor<T> editor)
过滤
过滤过程通过传入的Editor实现来返回需要的元素内容,这个Editor实现可以实现以下功能:
|
Copyright © 2019. All rights reserved.