- filter(Collection<T>, Predicate<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
对集合中非空的元素过滤并将过滤得到的元素作为新集合返回,不修改源集合
- filter(Map<K, V>, BiPredicate<K, V>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
对集合中非空的元素过滤并将过滤得到的元素作为新集合返回,不修改源集合
- filterByReverse(Map<K, V>, BiPredicate<K, V>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
对集合中非空的元素过滤,并将过滤后的剩余元素作为新集合返回,不修改源集合
eg:
{@code
Map source = MapUtil.
- filterByReverse(Collection<T>, Predicate<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
对集合集合中非空的元素过滤,并将过滤后的剩余元素作为新集合返回,不修改源集合
eg:
List<String> source = Arrays.asList("123", "456", "789", "456");
List<String> result = filterByReverse(source, s -> s.equals("456"));
System.out.println(result); // [123, 789]
- filterNotNull(Collection<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
对集合中非空的元素过滤,返回不为null的元素,不修改源集合
- findGetterMethod(Class<?>, String) - 类 中的静态方法top.xiajibagao.crane.helper.BeanPropertyUtils
-
获取Getter方法
标准:以get开头 + 首字母大写的属性名,没有参数;
fluent:与属性名同名,没有参数;
当获取到任意一个符合上述标准的方法后将直接返回
- findKeyNode(JsonNode, AssembleOperation) - 类 中的方法top.xiajibagao.crane.impl.json.JacksonAssembler
-
先寻找ObjectMapper的命名规则处理后的key字段名对应的节点,若不存在,则再根据别名寻找至少一个存在的别名字段对应的节点
- findNode(JsonNode, String) - 类 中的静态方法top.xiajibagao.crane.helper.JacksonUtils
-
获取节点
- findNodes(JsonNode, Collection<String>) - 类 中的静态方法top.xiajibagao.crane.helper.JacksonUtils
-
获取非空节点
- findSetterMethod(Class<?>, String, Class<?>) - 类 中的静态方法top.xiajibagao.crane.helper.BeanPropertyUtils
-
获取Setter方法
标准:以set开头 + 首字母大写的属性名,有且仅有一个与field.getType()类型相同或为子类型的参数;
fluent:与属性名同名,有且仅有一个与field.getType()类型相同或为子类型的参数;
当获取到任意一个符合上述标准的方法后将直接返回
- findTargetPropertyNode(JsonNode, DisassembleOperation) - 类 中的方法top.xiajibagao.crane.impl.json.JacksonDisassembler
-
先寻找ObjectMapper的命名规则处理后的target字段名对应的节点,若不存在,则再根据别名寻找至少一个存在的别名字段对应的节点
- flatMap(Collection<S>, Function<S, ? extends Collection<T>>, Supplier<C>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为二重集合,然后将其平铺为指定类型集合,总是过滤二重集合中的空集合
eg:
List<String> source = Arrays.asList("123", "421", null, "233");
Set<String> result = flatMap(source, s -> Arrays.asList(s.split("")), HashSet::new);
System.out.println(result); // [1, 2, 3, 4]
- flatMap(Collection<S>, Function<S, R>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为二重集合,然后将其平铺为ArrayList集合,总是过滤二重集合中的空集合
eg:
List<String> source = Arrays.asList("123", "421", null, "233");
List<String> result = flatMap(source, s -> Arrays.asList(s.split("")));
System.out.println(result); // [1, 2, 3, 4, 2, 1, 2, 3, 3]
- foreach(C, Consumer<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
遍历集合元素并进行操作,总是过滤集合中为null的元素
- foreach(M, BiConsumer<K, V>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
遍历集合元素并进行操作,总是过滤集合中为key和value任意一者为null的元素
- foreachByAsc(ObjIntConsumer<T>) - 类 中的方法top.xiajibagao.crane.helper.CounterSet
-
- foreachByDesc(ObjIntConsumer<T>) - 类 中的方法top.xiajibagao.crane.helper.CounterSet
-
- found(OperationConfiguration) - 类 中的方法top.xiajibagao.crane.parse.BeanOperateConfigurationParser.ParseContext
-
- get(String, String) - 类 中的方法top.xiajibagao.crane.container.KeyValueContainer
-
获取值
- get(String) - 类 中的方法top.xiajibagao.crane.helper.EnumDict.EnumDictType
-
根据字典项名称获取字典项
- get(Enum<?>) - 类 中的方法top.xiajibagao.crane.helper.EnumDict.EnumDictType
-
根据字典实例获取字典项
- get(R, C) - 类 中的方法top.xiajibagao.crane.helper.TableMap
-
- GET_PREFIX - 类 中的静态变量top.xiajibagao.crane.helper.BeanPropertyUtils
-
- getAssembleOperations() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.OperationConfiguration
-
获取待处理的装配操作
- getAssembler() - 类 中的方法top.xiajibagao.crane.impl.bean.BeanReflexOperatorFactory
-
- getAssembler() - 类 中的方法top.xiajibagao.crane.impl.json.JacksonOperatorFactory
-
- getAssembler() - 接口 中的方法top.xiajibagao.crane.operator.interfaces.OperatorFactory
-
获取装配器
- getAssembler() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取装配器
- getBeanByPath(ObjectMapper, T, String) - 类 中的静态方法top.xiajibagao.crane.helper.JacksonUtils
-
- getCache(Class<?>, String) - 类 中的静态方法top.xiajibagao.crane.helper.BeanPropertyUtils
-
从缓存中获取属性描述器缓存对象,若不存在则先创建缓存
- getContainer() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取数据源容器
- getDisassembleOperations() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.OperationConfiguration
-
获取待处理的拆卸操作
- getDisassembler() - 类 中的方法top.xiajibagao.crane.impl.bean.BeanReflexOperatorFactory
-
- getDisassembler() - 类 中的方法top.xiajibagao.crane.impl.json.JacksonOperatorFactory
-
- getDisassembler() - 接口 中的方法top.xiajibagao.crane.operator.interfaces.OperatorFactory
-
获取拆卸器
- getDisassembler() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.DisassembleOperation
-
获取拆卸器
- getEnum(Class<T>, String) - 类 中的方法top.xiajibagao.crane.helper.EnumDict
-
获取指定枚举
- getEnum(String, String) - 类 中的方法top.xiajibagao.crane.helper.EnumDict
-
获取指定枚举
- getFirst(Iterable<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
- getGlobalConfiguration() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.OperationConfiguration
-
获取全局配置
- getItem(String, String) - 类 中的方法top.xiajibagao.crane.helper.EnumDict
-
获取指定枚举项
- getItem(Class<T>, String) - 类 中的方法top.xiajibagao.crane.helper.EnumDict
-
获取指定枚举项
- getKey(Object, AssembleOperation) - 类 中的方法top.xiajibagao.crane.impl.bean.BeanReflexAssembler
-
- getKey(Object, AssembleOperation) - 类 中的方法top.xiajibagao.crane.impl.json.JacksonAssembler
-
找到JsonNode中注解字段对应的节点,并返回其JsonNode.asText()。
- getKey(Object, AssembleOperation) - 接口 中的方法top.xiajibagao.crane.operator.interfaces.Assembler
-
从实例中获取所需的key字段数据
- getKeyEntersFromTarget(Object, List<AssembleOperation>) - 类 中的方法top.xiajibagao.crane.extend.BaseContainer
-
从对象中获取所需要的数据源id
- getKeyEntersFromTargets(List<Object>, List<AssembleOperation>) - 类 中的方法top.xiajibagao.crane.extend.BaseContainer
-
将对象集合转为所需要的数据源id
- getLength(T...) - 类 中的静态方法top.xiajibagao.crane.helper.ArrayUtils
-
- getLookingForConfig(Class<?>) - 类 中的方法top.xiajibagao.crane.parse.BeanOperateConfigurationParser.ParseContext
-
- getMax() - 类 中的方法top.xiajibagao.crane.helper.CounterSet
-
- getMin() - 类 中的方法top.xiajibagao.crane.helper.CounterSet
-
- getModuleName() - 类 中的方法top.xiajibagao.crane.impl.json.module.CraneDynamicJsonModule
-
- getName() - 类 中的方法top.xiajibagao.crane.helper.PropertyCache
-
- getNamespace() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取命名空间
- getOperatorFactory() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.OperationConfiguration
-
获取操作者工厂
- getOwner() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取所属类操作
- getOwner() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.DisassembleOperation
-
获取所属类操作
- getParser() - 类 中的静态方法top.xiajibagao.crane.helper.ExpressionUtils
-
获取通用表达式解析器
- getProcessor(String, ProcessConfig) - 类 中的方法top.xiajibagao.crane.helper.CacheableAnnotationProcessor
-
从缓存中获取处理器,若不存在则先进行初始化
- getProcessorId(T, Object, ProcessConfig) - 类 中的方法top.xiajibagao.crane.helper.CacheableAnnotationProcessor
-
获取处理器id
- getProcessorId(T, Object, ProcessConfig) - 类 中的方法top.xiajibagao.crane.helper.CacheableAnnotationProcessor.SimpleCacheableAnnotationProcessor
-
- getProcessorId(Method, Object, ProcessConfig) - 类 中的方法top.xiajibagao.crane.impl.bean.aop.MethodResultProcessAspect
-
- getProperties() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取装配配置字段
- getPropertyCaches(Class<?>) - 类 中的静态方法top.xiajibagao.crane.helper.BeanPropertyUtils
-
从缓存中获取属性描述器缓存对象,若不存在则先创建缓存
- getReference() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleProperty
-
获取引用字段
- getResource() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleProperty
-
获取数据源字段
- getSort() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取排序
- getSort() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.DisassembleOperation
-
获取排序
- getSources(List<PairEntry<K, String>>) - 类 中的方法top.xiajibagao.crane.extend.BaseContainer
-
根据数据源id与对应的namespace获取数据集
- getTargetClass() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.OperationConfiguration
-
获取配置类型
- getTargetOperateConfiguration() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.DisassembleOperation
-
待拆解对象的操作配置
- getTargetProperty() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取注解字段
- getTargetProperty() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.DisassembleOperation
-
获取注解字段
- getTargetPropertyAliases() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.AssembleOperation
-
获取注解字段别名
- getTargetPropertyAliases() - 接口 中的方法top.xiajibagao.crane.parse.interfaces.DisassembleOperation
-
获取注解字段别名
- getTranslatedKeyPropertyName(AssembleOperation) - 类 中的方法top.xiajibagao.crane.impl.json.JacksonAssembler
-
将key字段名按ObjectMapper的配置转换
- getTranslatedTargetPropertyName(DisassembleOperation) - 类 中的方法top.xiajibagao.crane.impl.json.JacksonDisassembler
-
将key字段名按ObjectMapper的配置转换
- getType(String) - 类 中的方法top.xiajibagao.crane.helper.EnumDict
-
获取指定枚举类型
- getType(Class<T>) - 类 中的方法top.xiajibagao.crane.helper.EnumDict
-
获取指定枚举类型
- getValue(Object) - 类 中的方法top.xiajibagao.crane.helper.PropertyCache
-
- groupBy(Collection<T>, Function<T, K>, Function<T, V>, Supplier<C>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将集合按指定条件分组,再将对分组后得到的value集合转为另一指定类型的集合
- groupBy(Collection<T>, Function<T, K>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将集合按指定条件分组
- groupByAndThen(Collection<S>, Function<S, K>, Function<S, V>, BiFunction<K, List<V>, R>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将集合按指定规则分组,然后得到分组结果的val集合转为另一种集合,最后再对转换后的val集合进行映射
eg:
List source = Arrays.asList("123", "123", "233", "456");
Map result = toMapAndThen(
source,
Function.identity(),
Integer::valueOf,
(id, list) -> "\"id: " + id + ", count: " + list.size() + "\""
);
System.out.println(result); // {456="id: 456, count: 1", 233="id: 233, count: 1", 123="id: 123, count: 2"}
- groupByAndThen(Collection<S>, Function<S, K>, BiFunction<K, List<S>, R>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将集合按指定规则分组,然后得到分组结果的val集合进行映射
eg:
List source = Arrays.asList("123", "123", "233", "456");
Map result = toMapAndThen(
source,
Function.identity(),
(id, list) -> "\"id: " + id + ", count: " + list.size() + "\""
);
System.out.println(result); // {456="id: 456, count: 1", 233="id: 233, count: 1", 123="id: 123, count: 2"}
- groupByThenFlat(List<S>, Function<S, K>, Function<S, T>, BiFunction<K, List<T>, R>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一组元素分组后转为为另一类型集合,然后对分组结果进行映射, 总是过滤映射后集合中为null的元素
eg:
List<String> source = Arrays.asList("123", "156", "233", "244", "567");
List<String> result = groupByThenFlat(
source,
str -> str.substring(0, 1),
str -> "item: " + str,
(key, values) -> key + ": " + values.toString()
);
System.out.println(result); // 1: [item: 123, item: 156], 5: [item: 567], 2: [item: 233, item: 244]
- TableMap<R,C,V> - top.xiajibagao.crane.helper中的类
-
由两个键确定唯一值的Map
- TableMap() - 类 的构造器top.xiajibagao.crane.helper.TableMap
-
- throwIfFalse(boolean, String, Object...) - 异常错误 中的静态方法top.xiajibagao.crane.exception.CraneException
-
- throwIfTrue(boolean, String, Object...) - 异常错误 中的静态方法top.xiajibagao.crane.exception.CraneException
-
- throwOf(String, Object...) - 异常错误 中的静态方法top.xiajibagao.crane.exception.CraneException
-
- toCollection(Collection<S>, Supplier<C>, Function<S, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为另一指定集合, 总是过滤转换源集合与转换后的集合中为null的元素
eg:
List<String> stringList = Arrays.asList("123", null, "424", "233", null);
System.out.println(stringList); // [123, null, 424, 233, null]
Set<Integer> integerSet = CollUtils.toCollection(stringList, LinkedHashSet::new, Integer::parseInt);
System.out.println(integerSet); // [123, 424, 233]
- toCollection(Collection<S>, Supplier<C>, Supplier<T>, BiConsumer<S, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
针对源集合中每一个元素创建另一类型元素,经过处理后返回另一类型元素祖册的集合,总是忽略源集合与返回集合中未null的元素
eg:
List<String> strings = Arrays.asList("200", "300", null, "500");
Set<List<String>> integers = toCollection(
strings,
HashSet::new, ArrayList::new,
(s, i) -> {
i.add(s);
i.add(s + s);
}
);
System.out.println(integers); // [[300, 300300], [500, 500500], [200, 200200]]
- toCollection(Map<K, V>, Supplier<C>, BiFunction<K, V, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个Map集合转为另一指定Collection集合, 总是过滤转换后的集合中为null的元素
eg:
{@code
Map source = MapUtil.
- toList(T...) - 类 中的静态方法top.xiajibagao.crane.helper.ArrayUtils
-
- toList(Map<K, V>, BiFunction<K, V, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个Map集合转为ArrayList集合, 总是过滤转换后的集合中为null的元素
- toList(Collection<S>, Function<S, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为另一ArrayList集合
- toList(Collection<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为ArrayList集合
- toList(Collection<S>, Supplier<T>, BiConsumer<S, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
针对源集合中每一个元素创建另一类型元素,经过处理后返回另一类型元素的集合,总是忽略源集合与返回集合中未null的元素
eg:
List<String> strings = Arrays.asList("200", "300", null, "500");
List<List<String>> integers = toList(
strings,
ArrayList::new,
(s, i) -> {
i.add(s);
i.add(s + s);
}
);
System.out.println(integers); // [[300, 300300], [500, 500500], [200, 200200]]
- toMap(Collection<T>, Function<T, K>, Function<T, V>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将集合按指定条件映射为map集合
- toMap(Collection<T>, Function<T, K>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将集合按指定条件映射为map集合
- toMap(Map<A, B>, Function<A, C>, Function<B, D>, Supplier<Map<C, D>>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一种类型的Map集合转换为另一种类型的Map集合
eg:
{@code
Map source = MapUtil.
- top.xiajibagao.crane - 程序包 top.xiajibagao.crane
-
- top.xiajibagao.crane.annotation - 程序包 top.xiajibagao.crane.annotation
-
- top.xiajibagao.crane.config - 程序包 top.xiajibagao.crane.config
-
- top.xiajibagao.crane.container - 程序包 top.xiajibagao.crane.container
-
- top.xiajibagao.crane.exception - 程序包 top.xiajibagao.crane.exception
-
- top.xiajibagao.crane.extend - 程序包 top.xiajibagao.crane.extend
-
- top.xiajibagao.crane.helper - 程序包 top.xiajibagao.crane.helper
-
- top.xiajibagao.crane.impl.bean - 程序包 top.xiajibagao.crane.impl.bean
-
- top.xiajibagao.crane.impl.bean.aop - 程序包 top.xiajibagao.crane.impl.bean.aop
-
- top.xiajibagao.crane.impl.json - 程序包 top.xiajibagao.crane.impl.json
-
- top.xiajibagao.crane.impl.json.module - 程序包 top.xiajibagao.crane.impl.json.module
-
- top.xiajibagao.crane.operator - 程序包 top.xiajibagao.crane.operator
-
- top.xiajibagao.crane.operator.interfaces - 程序包 top.xiajibagao.crane.operator.interfaces
-
- top.xiajibagao.crane.parse - 程序包 top.xiajibagao.crane.parse
-
- top.xiajibagao.crane.parse.interfaces - 程序包 top.xiajibagao.crane.parse.interfaces
-
- toSet(Collection<S>, Function<S, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为另一HashSet集合
- toSet(Collection<T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为HashSet集合
- toSet(Map<K, V>, BiFunction<K, V, T>) - 类 中的静态方法top.xiajibagao.crane.helper.CollUtils
-
将一个集合转为另一HashSet集合
- translatePropertyName(ObjectMapper, String) - 类 中的静态方法top.xiajibagao.crane.helper.JacksonUtils
-
根据objectMapper配置序列化参数
- translatePropertyName(String) - 类 中的方法top.xiajibagao.crane.impl.json.JacksonAssembler
-
将字段名按ObjectMapper的配置转换
- tryAction(Runnable, Consumer<Throwable>) - 类 中的静态方法top.xiajibagao.crane.helper.ObjectUtils
-
尝试进行一次操作
- tryAction(Supplier<T>, Consumer<Throwable>, Consumer<T>) - 类 中的静态方法top.xiajibagao.crane.helper.ObjectUtils
-
尝试进行一次操作
- trySupply(Supplier<T>, Consumer<Throwable>) - 类 中的静态方法top.xiajibagao.crane.helper.ObjectUtils
-
尝试进行一次生成