Salam has posted 1 posts at DZone. View Full User Profile

LINQ for Java

10.08.2011
| 3277 views |
  • submit to reddit
Location: 
https://github.com/nicholas22/jpropel-light

 This library allows you to write the follwing valid Java code:

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

// join two arrays and put in list 
List allowed = alphabet.join(numerics).box().toList(); 

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

Download at: https://github.com/nicholas22/jpropel-light
0
Published at DZone with permission of its author, Salam Kaser.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Jacek Furmankiewicz replied on Tue, 2011/10/11 - 8:52am

Maven repo, please. Without it's hard to integrate it into any existing project.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.