【发布时间】:2013-08-09 19:13:44
【问题描述】:
例如,如果我有
ArrayList<Product> productlist = new ArrayList<Product> ();
你如何得到product.code等于1和2的所有产品?
有没有可以使用的库?
在c#中我可以使用
productlist.where(product=> product.code.contains(arraywithproductcode)).ToList();
或其他方式正在使用
var newlist=(from p in productlist join a in arraywithproduct on a.product equals a select p);
我怎样才能在java for android中得到它?
【问题讨论】:
-
查看 TotallyLazy 库:code.google.com/p/totallylazy