0

Just like C# provides me LINQ, is there any package or pre-processor in Java?

matrix
  • 2,860
  • 3
  • 23
  • 35

2 Answers2

2

Simply put, no. Check out Jon Skeet's answer.

Community
  • 1
  • 1
Mateo
  • 1,910
  • 2
  • 21
  • 27
2

Uhm... yes! See https://github.com/nicholas22/jpropel-light

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

  // join two arrays and put in list 
  alphabet.join(numerics).toList(); 

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