fix the build on main (#31251)
* Fix compilation on scala 2.12 * Add mergePrioritizedN to docs * Format Java code
This commit is contained in:
parent
fccb0ca220
commit
332f18c42b
4 changed files with 55 additions and 55 deletions
|
|
@ -208,10 +208,8 @@ class SourceOrFlow {
|
|||
Source<Integer, NotUsed> sourceA = Source.from(Arrays.asList(1, 2, 3, 4));
|
||||
Source<Integer, NotUsed> sourceB = Source.from(Arrays.asList(10, 20, 30, 40));
|
||||
Source<Integer, NotUsed> sourceC = Source.from(Arrays.asList(100, 200, 300, 400));
|
||||
List<Pair<Source<Integer, ?>,Integer>> sourcesAndPriorities = Arrays.asList(
|
||||
new Pair<>(sourceA, 9900),
|
||||
new Pair<>(sourceB, 99),
|
||||
new Pair<>(sourceC, 1));
|
||||
List<Pair<Source<Integer, ?>, Integer>> sourcesAndPriorities =
|
||||
Arrays.asList(new Pair<>(sourceA, 9900), new Pair<>(sourceB, 99), new Pair<>(sourceC, 1));
|
||||
Source.mergePrioritizedN(sourcesAndPriorities, false).runForeach(System.out::println, system);
|
||||
// prints e.g. 1, 100, 2, 3, 4, 10, 20, 30, 40, 200, 300, 400 since both sources have their
|
||||
// first element ready and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue