=str #16935 revive dsl factories consistency spec

I fought the dragons, and I won...
This commit is contained in:
Martynas Mickevičius 2015-06-26 09:51:08 +03:00
parent 911943fc92
commit 27201206f6
2 changed files with 63 additions and 37 deletions

View file

@ -213,6 +213,14 @@ object Source {
def concat[T, M1, M2](first: Graph[SourceShape[T], M1], second: Graph[SourceShape[T], M2]): Source[T, (M1, M2)] =
new Source(scaladsl.Source.concat(first, second))
/**
* Concatenates two sources so that the first element
* emitted by the second source is emitted after the last element of the first
* source.
*/
def concatMat[T, M1, M2, M3](first: Graph[SourceShape[T], M1], second: Graph[SourceShape[T], M2], combine: function.Function2[M1, M2, M3]): Source[T, M3] =
new Source(scaladsl.Source.concatMat(first, second)(combinerToScala(combine)))
/**
* A graph with the shape of a source logically is a source, this method makes
* it so also in type.