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 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.
Real LINQ for Java
github.com