Commit 6eb0e06d authored by yanzg's avatar yanzg

下载视频

parent 6c2c6c1e
......@@ -46,6 +46,23 @@ public class ArrayHelper {
return froms.size() > 0 ? froms.get(0) : null;
}
/**
* 获取第一个对象
*
* @param froms
* @param <T>
* @return
*/
public static <T extends Object> T getFirst(Collection<T> froms) {
if (froms == null) {
return null;
}
for (T from : froms) {
return from;
}
return null;
}
/**
* 判断对象是否是数组或者List
*
......
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