Missing Java API: Source.empty

This commit is contained in:
Seeta Ramayya 2019-01-07 15:02:24 +01:00 committed by Johan Andrén
parent 2af9b6bd35
commit 75713c3469
2 changed files with 14 additions and 1 deletions

View file

@ -40,6 +40,11 @@ object Source {
*/
def empty[O](): Source[O, NotUsed] = _empty.asInstanceOf[Source[O, NotUsed]]
/**
* Create a `Source` with no elements. The result is the same as calling `Source.<O>empty()`
*/
def empty[T](clazz: Class[T]): Source[T, NotUsed] = empty[T]()
/**
* Create a `Source` which materializes a [[java.util.concurrent.CompletableFuture]] which controls what element
* will be emitted by the Source.