Commit 6c2c6c1e authored by yanzg's avatar yanzg

下载视频

parent 0022590c
...@@ -2,6 +2,7 @@ package com.yanzuoguang.util.helper; ...@@ -2,6 +2,7 @@ package com.yanzuoguang.util.helper;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.List; import java.util.List;
/** /**
...@@ -17,13 +18,13 @@ public class ArrayHelper { ...@@ -17,13 +18,13 @@ public class ArrayHelper {
* @param froms 参数列表 * @param froms 参数列表
* @return 第一个非空字符串 * @return 第一个非空字符串
*/ */
public static <T extends Object> List<T> megerNotEmpty(T from, List<T>... froms) { public static <T extends Object> List<T> megerNotEmpty(T from, Collection<T>... froms) {
List<T> tos = new ArrayList<>(); List<T> tos = new ArrayList<>();
if (!StringHelper.isEmpty(from)) { if (!StringHelper.isEmpty(from)) {
tos.add(from); tos.add(from);
} }
if (froms != null) { if (froms != null) {
for (List<T> list : froms) { for (Collection<T> list : froms) {
for (T item : list) { for (T item : list) {
if (!StringHelper.isEmpty(item)) { if (!StringHelper.isEmpty(item)) {
tos.add(item); tos.add(item);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment