-str - #18806 - Replacing flatten(FlattenStrategy) with flattenConcat

This commit is contained in:
Viktor Klang 2015-10-29 16:55:03 +01:00
parent 06ce968b16
commit ce10456804
15 changed files with 31 additions and 84 deletions

View file

@ -841,10 +841,10 @@ class Source[+Out, +Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[Sour
/**
* Transforms a stream of streams into a contiguous stream of elements using the provided flattening strategy.
* This operation can be used on a stream of element type [[Source]].
* This operation can be used on a stream of element type `Source[U]`.
*/
def flatten[U](strategy: FlattenStrategy[Out, U]): javadsl.Source[U, Mat] =
new Source(delegate.flatten(strategy))
def flattenConcat[U](): javadsl.Source[U, Mat] =
new Source(delegate.flattenConcat[U]()(conforms[U].asInstanceOf[Out <:< scaladsl.Source[U, _]]))
override def withAttributes(attr: Attributes): javadsl.Source[Out, Mat] =
new Source(delegate.withAttributes(attr))