开发者

Is there any LINQ like implementation in java? [duplicate]

This question already has answers here: 开发者_StackOverflow中文版 What is the Java equivalent for LINQ? [closed] (34 answers) Closed 9 years ago.

Just like C# provides me LINQ, is there any package or pre-processor in Java?


Simply put, no. Check out Jon Skeet's answer.


Uhm... yes! See https://github.com/nicholas22/jpropel-light

  // create alphabet char[]
  new Character('A').to(new Character('Z')).unbox();

  // join two arrays and put in list 
  alphabet.join(numerics).toList(); 

  // select distinct j* names, using LINQ-style statements
  new String[] { "james", "john", "john", "eddie" }.where(startsWith("j")).distinct();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜