LINQ 是否有 Java 等价物?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10879761/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 02:57:12  来源:igfitidea点击:

Is there a Java equivalent for LINQ?

javalinq

提问by Scooterville

Possible Duplicate:
What is the Java equivalent for LINQ?

可能的重复:
LINQ 的 Java 等价物是什么?

There are numerous questions asking whether there is a Java equivalent for LINQ. But most of them are incorrectly specifying that there is nothing.

有很多问题询问是否有 LINQ 的 Java 等价物。但他们中的大多数人错误地指出没有任何东西。

回答by Scooterville

This library provides a full LINQ API: https://github.com/nicholas22/jpropel-light

这个库提供了一个完整的 LINQ API:https: //github.com/nicholas22/jpropel-light

It does so with functional-style constructs and it also uses deferred execution.

它使用函数式构造来实现,并且还使用延迟执行。

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

回答by Tudor

Another one that I've tried myself is jaque: http://code.google.com/p/jaque/

我自己尝试过的另一个是 jaque:http: //code.google.com/p/jaque/