1. 将list转为map
public Map<String, AClass> getLarkMap(List<AClass> aList) { return aList.stream().collect(Collectors.toMap(AClass::getUrl, a -> a, (k1, k2) -> k2)); }
2. 将list中感兴趣的内容过滤出来
public List<AClass> getLarkList(String url, List<AClass> aList) { return aList.stream().filter(AClass -> AClass.getUrl().equals(url)).collect(Collectors.toList()); }