|
@@ -290,7 +290,7 @@ public class CollectionUtils {
|
|
return valueFunc.apply(t);
|
|
return valueFunc.apply(t);
|
|
}
|
|
}
|
|
|
|
|
|
- public static <T, V extends Comparable<? super V>> T getMinPropertyObj(List<T> from, Function<T, V> valueFunc) {
|
|
|
|
|
|
+ public static <T, V extends Comparable<? super V>> T getMinObject(List<T> from, Function<T, V> valueFunc) {
|
|
if (CollUtil.isEmpty(from)) {
|
|
if (CollUtil.isEmpty(from)) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -298,7 +298,6 @@ public class CollectionUtils {
|
|
return from.stream().min(Comparator.comparing(valueFunc)).get();
|
|
return from.stream().min(Comparator.comparing(valueFunc)).get();
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public static <T, V extends Comparable<? super V>> V getSumValue(Collection<T> from, Function<T, V> valueFunc,
|
|
public static <T, V extends Comparable<? super V>> V getSumValue(Collection<T> from, Function<T, V> valueFunc,
|
|
BinaryOperator<V> accumulator) {
|
|
BinaryOperator<V> accumulator) {
|
|
return getSumValue(from, valueFunc, accumulator, null);
|
|
return getSumValue(from, valueFunc, accumulator, null);
|