java - best way or similar lambda expression or linq on android (eclipse) -
for example if have
arraylist<product> productlist = new arraylist<product> ();
how products product.code
equals 1 , 2?
is there library can use?
in c# use
productlist.where(product=> product.code.contains(arraywithproductcode)).tolist();
or other way using
var newlist=(from p in productlist join in arraywithproduct on a.product equals select p);
how can in java android?
no lambda expressions in android (or java) yet.
you might want see these options (haven't tested them in android though):
- quaere: http://quaere.codehaus.org
- jaqu: http://www.h2database.com/html/jaqu.html
- linq4j: https://github.com/julianhyde/linq4j
- slick: http://slick.typesafe.com/
also, see this dzone link , this one. stackoverflow post mentions this.
update:
lambda expression available in java se 8 more information visit:
Comments
Post a Comment