Fix incorrect materialized types = Unit in stream documentation (#21938)

* Fix incorrect materialized types = Unit in stream documentation (Fixes #21937)

*  Correct Int, which should be Integer in Java

* Replace BoxedUnit in stream doc
This commit is contained in:
Richard Imaoka 2016-12-06 23:52:54 +09:00 committed by Patrik Nordwall
parent c38d3850a2
commit 3df22baf3a
8 changed files with 15 additions and 15 deletions

View file

@ -243,19 +243,19 @@ public class CompositionDocTest extends AbstractJavaTest {
@Test
public void materializedValues() throws Exception {
//#mat-combine-1
// Materializes to Promise<BoxedUnit> (red)
// Materializes to CompletableFuture<Optional<Integer>> (red)
final Source<Integer, CompletableFuture<Optional<Integer>>> source = Source.<Integer>maybe();
// Materializes to BoxedUnit (black)
// Materializes to NotUsed (black)
final Flow<Integer, Integer, NotUsed> flow1 = Flow.of(Integer.class).take(100);
// Materializes to Promise<Option<>> (red)
// Materializes to CompletableFuture<Optional<Integer>> (red)
final Source<Integer, CompletableFuture<Optional<Integer>>> nestedSource =
source.viaMat(flow1, Keep.left()).named("nestedSource");
//#mat-combine-1
//#mat-combine-2
// Materializes to BoxedUnit (orange)
// Materializes to NotUsed (orange)
final Flow<Integer, ByteString, NotUsed> flow2 = Flow.of(Integer.class)
.map(i -> ByteString.fromString(i.toString()));