replace unicode arrows
* ⇒, →, ← * because we don't want to show them in documentation snippets and then it's complicated to avoid that when snippets are located in src/test/scala in individual modules * dont replace object `→` in FSM.scala and PersistentFSM.scala
This commit is contained in:
parent
e4d38f92a4
commit
5c96a5f556
1521 changed files with 18846 additions and 18786 deletions
|
|
@ -175,7 +175,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def mapConcat[T](f: function.Function[Out, java.lang.Iterable[T]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.mapConcat { elem ⇒ Util.immutableSeq(f(elem)) })
|
||||
new SubSource(delegate.mapConcat { elem => Util.immutableSeq(f(elem)) })
|
||||
|
||||
/**
|
||||
* Transform each input element into an `Iterable` of output elements that is
|
||||
|
|
@ -204,9 +204,9 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def statefulMapConcat[T](f: function.Creator[function.Function[Out, java.lang.Iterable[T]]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.statefulMapConcat { () ⇒
|
||||
new SubSource(delegate.statefulMapConcat { () =>
|
||||
val fun = f.create()
|
||||
elem ⇒ Util.immutableSeq(fun(elem))
|
||||
elem => Util.immutableSeq(fun(elem))
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
@ -241,7 +241,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* @see [[#mapAsyncUnordered]]
|
||||
*/
|
||||
def mapAsync[T](parallelism: Int, f: function.Function[Out, CompletionStage[T]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.mapAsync(parallelism)(x ⇒ f(x).toScala))
|
||||
new SubSource(delegate.mapAsync(parallelism)(x => f(x).toScala))
|
||||
|
||||
/**
|
||||
* Transform this stream by applying the given function to each of the elements
|
||||
|
|
@ -275,7 +275,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* @see [[#mapAsync]]
|
||||
*/
|
||||
def mapAsyncUnordered[T](parallelism: Int, f: function.Function[Out, CompletionStage[T]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.mapAsyncUnordered(parallelism)(x ⇒ f(x).toScala))
|
||||
new SubSource(delegate.mapAsyncUnordered(parallelism)(x => f(x).toScala))
|
||||
|
||||
/**
|
||||
* Only pass on those elements that satisfy the given predicate.
|
||||
|
|
@ -489,7 +489,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* See also [[FlowOps.scan]]
|
||||
*/
|
||||
def scanAsync[T](zero: T)(f: function.Function2[T, Out, CompletionStage[T]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.scanAsync(zero) { (out, in) ⇒ f(out, in).toScala })
|
||||
new SubSource(delegate.scanAsync(zero) { (out, in) => f(out, in).toScala })
|
||||
|
||||
/**
|
||||
* Similar to `scan` but only emits its result when the upstream completes,
|
||||
|
|
@ -534,7 +534,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
*
|
||||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def foldAsync[T](zero: T)(f: function.Function2[T, Out, CompletionStage[T]]): SubSource[T, Mat] = new SubSource(delegate.foldAsync(zero) { (out, in) ⇒ f(out, in).toScala })
|
||||
def foldAsync[T](zero: T)(f: function.Function2[T, Out, CompletionStage[T]]): SubSource[T, Mat] = new SubSource(delegate.foldAsync(zero) { (out, in) => f(out, in).toScala })
|
||||
|
||||
/**
|
||||
* Similar to `fold` but uses first element as zero element.
|
||||
|
|
@ -1153,7 +1153,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* @see [[#extrapolate]]
|
||||
*/
|
||||
def expand[U](expander: function.Function[Out, java.util.Iterator[U]]): SubSource[U, Mat] =
|
||||
new SubSource(delegate.expand(in ⇒ expander(in).asScala))
|
||||
new SubSource(delegate.expand(in => expander(in).asScala))
|
||||
|
||||
/**
|
||||
* Allows a faster downstream to progress independent of a slower upstream.
|
||||
|
|
@ -1180,7 +1180,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* @see [[#expand]]
|
||||
*/
|
||||
def extrapolate(extrapolator: function.Function[Out @uncheckedVariance, java.util.Iterator[Out @uncheckedVariance]]): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.extrapolate(in ⇒ extrapolator(in).asScala))
|
||||
new SubSource(delegate.extrapolate(in => extrapolator(in).asScala))
|
||||
|
||||
/**
|
||||
* Allows a faster downstream to progress independent of a slower upstream.
|
||||
|
|
@ -1208,7 +1208,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* @see [[#expand]]
|
||||
*/
|
||||
def extrapolate(extrapolator: function.Function[Out @uncheckedVariance, java.util.Iterator[Out @uncheckedVariance]], initial: Out @uncheckedVariance): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.extrapolate(in ⇒ extrapolator(in).asScala, Some(initial)))
|
||||
new SubSource(delegate.extrapolate(in => extrapolator(in).asScala, Some(initial)))
|
||||
|
||||
/**
|
||||
* Adds a fixed size buffer in the flow that allows to store elements from a faster upstream until it becomes full.
|
||||
|
|
@ -1256,7 +1256,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels or substream cancels
|
||||
*/
|
||||
def prefixAndTail(n: Int): SubSource[akka.japi.Pair[java.util.List[Out @uncheckedVariance], javadsl.Source[Out @uncheckedVariance, NotUsed]], Mat] =
|
||||
new SubSource(delegate.prefixAndTail(n).map { case (taken, tail) ⇒ akka.japi.Pair(taken.asJava, tail.asJava) })
|
||||
new SubSource(delegate.prefixAndTail(n).map { case (taken, tail) => akka.japi.Pair(taken.asJava, tail.asJava) })
|
||||
|
||||
/**
|
||||
* Transform each input element into a `Source` of output elements that is
|
||||
|
|
@ -1273,7 +1273,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
*
|
||||
*/
|
||||
def flatMapConcat[T, M](f: function.Function[Out, _ <: Graph[SourceShape[T], M]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.flatMapConcat(x ⇒ f(x)))
|
||||
new SubSource(delegate.flatMapConcat(x => f(x)))
|
||||
|
||||
/**
|
||||
* Transform each input element into a `Source` of output elements that is
|
||||
|
|
@ -1289,7 +1289,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def flatMapMerge[T, M](breadth: Int, f: function.Function[Out, _ <: Graph[SourceShape[T], M]]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.flatMapMerge(breadth, o ⇒ f(o)))
|
||||
new SubSource(delegate.flatMapMerge(breadth, o => f(o)))
|
||||
|
||||
/**
|
||||
* Concatenate the given [[Source]] to this [[Flow]], meaning that once this
|
||||
|
|
@ -1481,7 +1481,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def zip[T](source: Graph[SourceShape[T], _]): SubSource[akka.japi.Pair[Out @uncheckedVariance, T], Mat] =
|
||||
new SubSource(delegate.zip(source).map { case (o, t) ⇒ akka.japi.Pair.create(o, t) })
|
||||
new SubSource(delegate.zip(source).map { case (o, t) => akka.japi.Pair.create(o, t) })
|
||||
|
||||
/**
|
||||
* Combine the elements of current [[Flow]] and the given [[Source]] into a stream of tuples, picking always the latest element of each.
|
||||
|
|
@ -1496,7 +1496,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def zipLatest[T](source: Graph[SourceShape[T], _]): SubSource[akka.japi.Pair[Out @uncheckedVariance, T], Mat] =
|
||||
new SubSource(delegate.zipLatest(source).map { case (o, t) ⇒ akka.japi.Pair.create(o, t) })
|
||||
new SubSource(delegate.zipLatest(source).map { case (o, t) => akka.japi.Pair.create(o, t) })
|
||||
|
||||
/**
|
||||
* Put together the elements of current [[Flow]] and the given [[Source]]
|
||||
|
|
@ -1546,7 +1546,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def zipWithIndex: javadsl.SubSource[akka.japi.Pair[Out @uncheckedVariance, Long], Mat] =
|
||||
new SubSource(delegate.zipWithIndex.map { case (elem, index) ⇒ akka.japi.Pair(elem, index) })
|
||||
new SubSource(delegate.zipWithIndex.map { case (elem, index) => akka.japi.Pair(elem, index) })
|
||||
|
||||
/**
|
||||
* If the first element has not passed through this operator before the provided timeout, the stream is failed
|
||||
|
|
@ -1700,7 +1700,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
@Deprecated
|
||||
@deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12")
|
||||
def keepAlive(maxIdle: FiniteDuration, injectedElem: function.Creator[Out]): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.keepAlive(maxIdle, () ⇒ injectedElem.create()))
|
||||
new SubSource(delegate.keepAlive(maxIdle, () => injectedElem.create()))
|
||||
|
||||
/**
|
||||
* Injects additional elements if upstream does not emit for a configured amount of time. In other words, this
|
||||
|
|
@ -2004,7 +2004,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
@Deprecated
|
||||
@deprecated("Use throttle without `maximumBurst` parameter instead.", "2.5.12")
|
||||
def throttleEven(cost: Int, per: FiniteDuration,
|
||||
costCalculation: (Out) ⇒ Int, mode: ThrottleMode): javadsl.SubSource[Out, Mat] =
|
||||
costCalculation: (Out) => Int, mode: ThrottleMode): javadsl.SubSource[Out, Mat] =
|
||||
new SubSource(delegate.throttleEven(cost, per, costCalculation.apply _, mode))
|
||||
|
||||
/**
|
||||
|
|
@ -2020,7 +2020,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
@Deprecated
|
||||
@deprecated("Use throttle without `maximumBurst` parameter instead.", "2.5.12")
|
||||
def throttleEven(cost: Int, per: java.time.Duration,
|
||||
costCalculation: (Out) ⇒ Int, mode: ThrottleMode): javadsl.SubSource[Out, Mat] =
|
||||
costCalculation: (Out) => Int, mode: ThrottleMode): javadsl.SubSource[Out, Mat] =
|
||||
throttleEven(cost, per.asScala, costCalculation, mode)
|
||||
|
||||
/**
|
||||
|
|
@ -2120,7 +2120,7 @@ class SubSource[Out, Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[O
|
|||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def log(name: String, extract: function.Function[Out, Any], log: LoggingAdapter): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.log(name, e ⇒ extract.apply(e))(log))
|
||||
new SubSource(delegate.log(name, e => extract.apply(e))(log))
|
||||
|
||||
/**
|
||||
* Logs elements flowing through the stream as well as completion and erroring.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue