Merge pull request #17840 from 2m/wip-dsl-factories-cons

=str #16935 revive dsl factories consistency spec
This commit is contained in:
Martynas Mickevičius 2015-07-03 08:40:54 +03:00
commit e960f47e28
4 changed files with 123 additions and 67 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.