应用场景
过滤掉list列表里面的某一个元素 (对象,String...)
使用list.list.removeIf()方法

	//得到一个对象list
 	ProxyPool byId = service.getById(id);
        List<ProxyPool> all = proxyPoolMapper.getHybridPoolByState(type);
	//使用list.removeIf()方法
	//list.removeIf(s -> 需要移除的对象.equals(s))
        all.removeIf(s -> byId.equals(s));
上一篇 下一篇