Real LINQ for Java (github.com)

1 points by nicholas22 ↗ HN
Pure, valid, Java:

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

// join two arrays and put in list List<Character> allowed = alphabet.join(numbers).box().toList();

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

See homepage for more details.

0 comments

[ 6.2 ms ] story [ 7.3 ms ] thread

No comments yet.