Looking through https://github.com/google/guava/wiki/FunctionalExplained I see operations like transform, which will transform a list but keep the same cardinality. How can I perform a transform that results in a different cardinality? e.g. (pseudocode) List(1,2,3).transform(i => List(i, i))
-> List(1,1,2,2,3,3)
As of version 13, there is transformAndConcat
on FluentIterable
.
I don't think there's a direct translation, but transform
followed by concat
should be equivalent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With