=str Make Source.range simpler. (#31551)
This commit is contained in:
parent
aa9968a71b
commit
12ecd42989
1 changed files with 1 additions and 4 deletions
|
|
@ -175,10 +175,7 @@ object Source {
|
||||||
* @see [[scala.collection.immutable.Range.inclusive(Int, Int, Int)]]
|
* @see [[scala.collection.immutable.Range.inclusive(Int, Int, Int)]]
|
||||||
*/
|
*/
|
||||||
def range(start: Int, end: Int, step: Int): javadsl.Source[Integer, NotUsed] =
|
def range(start: Int, end: Int, step: Int): javadsl.Source[Integer, NotUsed] =
|
||||||
fromIterator[Integer](new function.Creator[util.Iterator[Integer]]() {
|
new Source(scaladsl.Source(Range.inclusive(start, end, step).asInstanceOf[immutable.Iterable[Integer]]))
|
||||||
def create(): util.Iterator[Integer] =
|
|
||||||
Range.inclusive(start, end, step).iterator.asJava.asInstanceOf[util.Iterator[Integer]]
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a new `Source` from the given `Future`. The stream will consist of
|
* Start a new `Source` from the given `Future`. The stream will consist of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue