BPM 模型重构 7:任务分配规则的后端,全部实现完成

This commit is contained in:
YunaiV
2022-01-15 01:39:30 +08:00
parent f46090243f
commit 902f2ecbad
9 changed files with 133 additions and 21 deletions

View File

@ -50,14 +50,14 @@ public class CollectionUtils {
if (CollUtil.isEmpty(from)) {
return new ArrayList<>();
}
return from.stream().map(func).collect(Collectors.toList());
return from.stream().map(func).filter(Objects::nonNull).collect(Collectors.toList());
}
public static <T, U> Set<U> convertSet(Collection<T> from, Function<T, U> func) {
if (CollUtil.isEmpty(from)) {
return new HashSet<>();
}
return from.stream().map(func).collect(Collectors.toSet());
return from.stream().map(func).filter(Objects::nonNull).collect(Collectors.toSet());
}
public static <T, K> Map<K, T> convertMap(Collection<T> from, Function<T, K> keyFunc) {