mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
e0508b0b88
commit
0cd29cb700
@ -567,7 +567,7 @@ public class CollUtil {
|
|||||||
*/
|
*/
|
||||||
public static <T> List<T> popPart(Stack<T> surplusAlaDatas, int partSize) {
|
public static <T> List<T> popPart(Stack<T> surplusAlaDatas, int partSize) {
|
||||||
if (isEmpty(surplusAlaDatas)) {
|
if (isEmpty(surplusAlaDatas)) {
|
||||||
return null;
|
return ListUtil.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<T> currentAlaDatas = new ArrayList<>();
|
final List<T> currentAlaDatas = new ArrayList<>();
|
||||||
@ -596,7 +596,7 @@ public class CollUtil {
|
|||||||
*/
|
*/
|
||||||
public static <T> List<T> popPart(Deque<T> surplusAlaDatas, int partSize) {
|
public static <T> List<T> popPart(Deque<T> surplusAlaDatas, int partSize) {
|
||||||
if (isEmpty(surplusAlaDatas)) {
|
if (isEmpty(surplusAlaDatas)) {
|
||||||
return null;
|
return ListUtil.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<T> currentAlaDatas = new ArrayList<>();
|
final List<T> currentAlaDatas = new ArrayList<>();
|
||||||
@ -1101,7 +1101,7 @@ public class CollUtil {
|
|||||||
*/
|
*/
|
||||||
public static <T> List<T> sub(Collection<T> list, int start, int end, int step) {
|
public static <T> List<T> sub(Collection<T> list, int start, int end, int step) {
|
||||||
if (list == null || list.isEmpty()) {
|
if (list == null || list.isEmpty()) {
|
||||||
return null;
|
return ListUtil.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
return sub(new ArrayList<>(list), start, end, step);
|
return sub(new ArrayList<>(list), start, end, step);
|
||||||
@ -1768,7 +1768,7 @@ public class CollUtil {
|
|||||||
*/
|
*/
|
||||||
public static <K, V> Map<K, V> zip(Collection<K> keys, Collection<V> values) {
|
public static <K, V> Map<K, V> zip(Collection<K> keys, Collection<V> values) {
|
||||||
if (isEmpty(keys) || isEmpty(values)) {
|
if (isEmpty(keys) || isEmpty(values)) {
|
||||||
return null;
|
return MapUtil.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
int entryCount = Math.min(keys.size(), values.size());
|
int entryCount = Math.min(keys.size(), values.size());
|
||||||
@ -2845,6 +2845,7 @@ public class CollUtil {
|
|||||||
* @param <T> 处理参数类型
|
* @param <T> 处理参数类型
|
||||||
* @author Looly
|
* @author Looly
|
||||||
*/
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
public interface Consumer<T> {
|
public interface Consumer<T> {
|
||||||
/**
|
/**
|
||||||
* 接受并处理一个参数
|
* 接受并处理一个参数
|
||||||
@ -2862,6 +2863,7 @@ public class CollUtil {
|
|||||||
* @param <V> VALUE类型
|
* @param <V> VALUE类型
|
||||||
* @author Looly
|
* @author Looly
|
||||||
*/
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
public interface KVConsumer<K, V> {
|
public interface KVConsumer<K, V> {
|
||||||
/**
|
/**
|
||||||
* 接受并处理一对参数
|
* 接受并处理一对参数
|
||||||
|
Loading…
x
Reference in New Issue
Block a user