+str #18840 add of method to predefined Shapes, for nicer Java use

This commit is contained in:
Konrad Malawski 2015-11-03 16:45:29 +01:00
parent 33444c572b
commit d06fe01e4a
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
}