就像C#为我提供LINQ,Java中是否有任何软件包或预处理器?
答案 0 :(得分:2)
简单地说,不。查看Jon Skeet's answer.
答案 1 :(得分:2)
// 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();