@Test public void inputs() { checkRestore(new Node() .withInput(it -> it.withAttribute(new MockAttribute("A"))) .withInput(it -> it.withAttribute(new MockAttribute("B"))) .withInput(it -> it.withAttribute(new MockAttribute("C")))); }
public Node withInput(Consumer<? super Input> configure) { newInput().configure(configure); return this; }
Node extends AbstractElement<Node> { public Node withInput(Consumer<? super Input> configure) { newInput().configure(configure); return this; } }
Node extends AbstractElement<Node> { public Node withInput(Consumer<? super Input> configure) { newInput().configure(configure); return this; } Node(); @JsonCreator(mode = Mode.DELEGATING)  Node(Info info);   Node(Node parent, Info info); }
Node extends AbstractElement<Node> { public Node withInput(Consumer<? super Input> configure) { newInput().configure(configure); return this; } Node(); @JsonCreator(mode = Mode.DELEGATING)  Node(Info info);   Node(Node parent, Info info); @Override Node getParent(); List<Input> getInputs(); Input getInput(int index); Input newInput(); Node withInput(Consumer<? super Input> configure); List<Output> getOutputs(); Output getOutput(int index); Output newOutput(); Node withOutput(Consumer<? super Output> configure); List<Node> getElements(); Node getElement(int index); Node newElement(); Node withElement(Consumer<? super Node> configure); List<Wire> getWires(); Wire getWire(int index); }
Node extends AbstractElement<Node> { public Node withInput(Consumer<? super Input> configure) { newInput().configure(configure); return this; } Node(); @JsonCreator(mode = Mode.DELEGATING)  Node(Info info);   Node(Node parent, Info info); @Override Node getParent(); List<Input> getInputs(); Input getInput(int index); Input newInput(); Node withInput(Consumer<? super Input> configure); List<Output> getOutputs(); Output getOutput(int index); Output newOutput(); Node withOutput(Consumer<? super Output> configure); List<Node> getElements(); Node getElement(int index); Node newElement(); Node withElement(Consumer<? super Node> configure); List<Wire> getWires(); Wire getWire(int index);  }