Constructor and Description |
---|
Node()
Creates a new empty instance.
|
Modifier and Type | Method and Description |
---|---|
TSelf |
configure(Consumer<? super TSelf> configure)
Configures this object.
|
List<? extends Attribute> |
getAttributes()
Returns the attributes of this element.
|
Node |
getElement(int index)
Returns the element node of this node.
|
List<Node> |
getElements()
Returns the element nodes of this node.
|
Input |
getInput(int index)
Returns the input port of this node.
|
List<Input> |
getInputs()
Returns the input ports of this node.
|
Output |
getOutput(int index)
Returns the output port of this node.
|
List<Output> |
getOutputs()
Returns the output ports of this node.
|
Node |
getParent()
Returns the parent element of this.
|
Wire |
getWire(int index)
Returns the wire on this node.
|
List<Wire> |
getWires()
Returns the wires on this node.
|
Node |
newElement()
Adds a new element node.
|
Input |
newInput()
Adds a new input port.
|
Output |
newOutput()
Adds a new output port.
|
String |
toString() |
TSelf |
withAttribute(Attribute attribute)
Adds an attribute.
|
TSelf |
withAttributes(Attribute... attributes)
Adds attributes.
|
TSelf |
withAttributes(List<? extends Attribute> attributes)
Adds attributes.
|
Node |
withElement(Consumer<? super Node> configure)
Adds a new node port.
|
Node |
withInput(Consumer<? super Input> configure)
Adds a new input port.
|
Node |
withOutput(Consumer<? super Output> configure)
Adds a new output port.
|
public Node getParent()
Element
null
if this is root elementpublic List<Input> getInputs()
public Input getInput(int index)
index
- the input indexpublic Input newInput()
public Node withInput(Consumer<? super Input> configure)
configure
- configures the created portpublic List<Output> getOutputs()
public Output getOutput(int index)
index
- the output indexpublic Output newOutput()
public Node withOutput(Consumer<? super Output> configure)
configure
- configures the created portpublic List<Node> getElements()
public Node getElement(int index)
index
- the element indexpublic Node newElement()
public Node withElement(Consumer<? super Node> configure)
configure
- configures the created portpublic List<Wire> getWires()
Input.connect(Output, Consumer)
,
Output.connect(Input, Consumer)
public Wire getWire(int index)
index
- the wire indexpublic TSelf configure(Consumer<? super TSelf> configure)
configure
- the configuratorpublic List<? extends Attribute> getAttributes()
Element
getAttributes
in interface Element
public TSelf withAttribute(Attribute attribute)
Element
withAttribute
in interface Element
attribute
- the attributepublic TSelf withAttributes(List<? extends Attribute> attributes)
Element
withAttributes
in interface Element
attributes
- the attributespublic TSelf withAttributes(Attribute... attributes)
Element
withAttributes
in interface Element
attributes
- the attributesCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.