java lamda

// 查询数据模拟
List<SealListViewVo> list = new ArrayList<SealListViewVo>();

for (int i = 0; i < 50; i++) {

SealListViewVo temp = new SealListViewVo();
String tempjigou = "广州分公司" + String.valueOf(i);

temp.setJigou(tempjigou);
temp.setAnjianhao("1501-2015030003");
temp.setHetongbianma("WMFHTJ150171");

list.add(temp);

}

if (!queryObjs.isEmpty()) {
String jigou = queryObjs.get(0).getValue().toString();

list = list.stream().filter(o -> o.getJigou().equals(jigou)).collect(Collectors.toList());

}

posted on 2017-01-17 14:49  wolf12  阅读(322)  评论(0编辑  收藏  举报