Docs: API docs for asSourceWithContext (#28950)
This commit is contained in:
parent
2db52a06ea
commit
c2945a3e7f
2 changed files with 6 additions and 0 deletions
|
|
@ -4312,6 +4312,9 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[
|
|||
def logWithMarker(name: String, marker: function.Function[Out, LogMarker]): javadsl.Source[Out, Mat] =
|
||||
this.logWithMarker(name, marker, ConstantFun.javaIdentityFunction[Out], null)
|
||||
|
||||
/**
|
||||
* Transform this source whose element is ``e`` into a source producing tuple ``(e, f(e))``
|
||||
**/
|
||||
def asSourceWithContext[Ctx](extractContext: function.Function[Out, Ctx]): SourceWithContext[Out, Ctx, Mat] =
|
||||
new scaladsl.SourceWithContext(this.asScala.map(x => (x, extractContext.apply(x)))).asJava
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue