I have two sets say:
ImmutableSet<String> firstSet = ImmutableSet.of("1","2","3");
ImmutableSet<String> secondSet = ImmutableSet.of("a","b","c");
I would like to get a set which consists of elements of the first set concatenated with each of the elements of the second, along with a delimiter i.e the output should be:
ImmutableSet<String> thirdSet = ImmutableSet.of("1.a","1.b","1.c","2.a","2.b","2.c","2.c","3.a","3.b","3.c");
(Here "." is my delimiter)
I had initially thought I would be able to do this by streaming the first set and applying Collectors.joining()
on the elements of the second, but that won't solve my need.