chore: Add Source.fromArray operator for Java dsl. (#1248)
This commit is contained in:
parent
b5eb6ff01a
commit
2c3e9b43b6
8 changed files with 126 additions and 0 deletions
|
|
@ -60,6 +60,14 @@ public class SourceDocExamples {
|
|||
// #source-from-example
|
||||
}
|
||||
|
||||
private static void fromArrayExample() {
|
||||
final ActorSystem system = null;
|
||||
// #source-from-array
|
||||
Source<String, NotUsed> words = Source.fromArray("Hello world".split("\\s"));
|
||||
words.runForeach(System.out::println, system);
|
||||
// #source-from-array
|
||||
}
|
||||
|
||||
static void rangeExample() {
|
||||
|
||||
final ActorSystem system = ActorSystem.create("Source");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue