Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wanted: Help translating From C# lambdas to Java 8 lambdas to Implement function GetPermutations

Siegfried Heintze
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to find all the permutations of a set of strings.
I did a google search for java and found some examples that seem to work:

However, I found this cool C# code (below) that used lambdas to do the job in much less code! Now that Java 8 has lambdas, is there a nicer compact way to code this in Java 8 similar to the approach taken by C# below?
It seems to me we should have some java counterpart to the selectMany function that would accept some lambdas to implement a filter like C# does.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic