title: What is the Guava equivalent of Scala's flatMap?
body: <p>Looking through <a href="https://github.com/google/guava/wiki/FunctionalExplained" rel="nofollow noreferrer">https://github.com/google/guava/wiki/FunctionalExplained</a> I see operations like <a href="https://google.github.io/guava/releases/23.0/api/docs/com/google/common/collect/Lists.html#transform-java.util.List-com.google.common.base.Function-" rel="nofollow noreferrer">transform</a>, 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) <code>List(1,2,3).transform(i =&gt; List(i, i))</code> -> <code>List(1,1,2,2,3,3)</code></p>