Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Java equivalent for LINQ? [duplicate]

Tags:

java

linq

Possible Duplicate:
What is the Java equivalent for LINQ?

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

like image 827
Scooterville Avatar asked Jun 04 '12 10:06

Scooterville


People also ask

Does Java have anything like LINQ?

NET, an easy way for you to simplify querying datasets is LINQ. Java doesn't have this, but since the introduction of Java 8 in 2014, you do now have the possibility to use "streams". Both LINQ and streams are ways to simplify querying datasets and to provide developers with an easy API to use.

What is LINQ in C# with example?

LINQ (Language Integrated Query) is uniform query syntax in C# and VB.NET to retrieve data from different sources and formats. It is integrated in C# or VB, thereby eliminating the mismatch between programming languages and databases, as well as providing a single querying interface for different types of data sources.


1 Answers

This library provides a full 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());
like image 87
Scooterville Avatar answered Oct 09 '22 22:10

Scooterville