Merge pull request #18842 from ktoso/wip-add-of-ktoso

+str #18840 add of method to predefined Shapes, for nicer Java use
This commit is contained in:
drewhk 2015-11-04 13:56:01 +01:00
commit e2b98da865
2 changed files with 27 additions and 5 deletions

View file

@ -78,22 +78,22 @@ public class MigrationsJava {
//#graph-create-2
FlowGraph.create(builder -> {
//...
return new SourceShape<>(outlet);
return SourceShape.of(outlet);
});
FlowGraph.create(builder -> {
//...
return new SinkShape<>(inlet);
return SinkShape.of(inlet);
});
FlowGraph.create(builder -> {
//...
return new FlowShape<>(inlet, outlet);
return FlowShape.of(inlet, outlet);
});
FlowGraph.create(builder -> {
//...
return new BidiShape<>(inlet1, outlet1, inlet2, outlet2);
return BidiShape.of(inlet1, outlet1, inlet2, outlet2);
});
//#graph-create-2
}