win.hupubao.common.utils.ListUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hupubao-common Show documentation
Show all versions of hupubao-common Show documentation
简单封装公共工具,二维码工具,驼峰转换工具,des加解密工具,http访问工具,字符串工具,日期工具
package win.hupubao.common.utils;
import java.util.Collection;
import java.util.List;
/**
* @author Moses
* @date 2017-08-30
*/
public class ListUtils {
/**
* list包含collection中任意一个
* @param list
* @param collection
* @return
*/
public static boolean containsAny(List> list,
Collection> collection){
if (list == null
|| list.isEmpty()) {
return false;
}
if (!collection.getClass().equals(list.get(0).getClass())){
return false;
}
for (Object object :
list) {
if (collection.contains(object)) {
return true;
}
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy