关于多list,项目里准入规则,取交集,记录一下

//求多个list交集
public List retainList(List> lists) {
    Optional> result = lists.parallelStream()
            .filter(list -> list != null && ((List) list).size() != 0)
            .reduce((a, b) -> {
                a.retainAll(b);
                return a;
            });
    return result.orElse(new ArrayList<>());
}

你可能感兴趣的:(linq,elementui,postman)