!str make Inlet/Outlet invariant and add Java variance

This necessitates the removal of method overloading in the Java Graph
DSL: the to() and via() methods were not otherwise resolved correctly by
javac, leading to incomprehensible error messages. The new approach is
to offer just one way of doing things which is a bit more verbose but
should be easier to read and learn. In this vein auto-importing while
using the DSL is also gone for Java—not sure about Scala yet.
This commit is contained in:
Roland Kuhn 2015-10-08 12:12:35 +02:00
parent c6a5864e25
commit dc07fd250c
23 changed files with 111 additions and 1649 deletions

View file

@ -646,8 +646,8 @@ public class FlowTest extends StreamTest {
public Inlet<String> apply(Builder<BoxedUnit> b) throws Exception {
final UniformFanOutShape<String, String> broadcast = b.graph(Broadcast.<String>create(2, true));
b.from(broadcast.out(0)).to(out1);
b.from(broadcast.out(1)).to(out2);
b.from(broadcast.out(0)).to(b.graph(out1));
b.from(broadcast.out(1)).to(b.graph(out2));
return broadcast.in();
}
});