java.lang.Object
org.praxislive.project.GraphBuilder.Base<GraphBuilder.Root>
org.praxislive.project.GraphBuilder.Root
- Enclosing class:
GraphBuilder
Root element builder.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a root element from this builder.Clear the existing commands.Add a command element.command(GraphElement.Command command) Add a command element.commands()Immutable snapshot of commands.id()Root ID.booleanQuery whether the root is synthetic.property(String id, GraphElement.Property property) Add a property element.transformCommands(Function<Stream<GraphElement.Command>, List<GraphElement.Command>> transform) Transform the existing commands.Methods inherited from class org.praxislive.project.GraphBuilder.Base
child, child, children, clearChildren, clearComments, clearConnections, clearProperties, comment, comment, comments, connection, connection, connections, properties, property, transformChildren, transformComments, transformConnections, transformProperties, type
-
Method Details
-
command
Add a command element.- Parameters:
command- command element- Returns:
- this
-
command
Add a command element.- Parameters:
command- command line- Returns:
- this
-
clearCommands
Clear the existing commands.- Returns:
- this
-
property
Description copied from class:GraphBuilder.BaseAdd a property element.- Overrides:
propertyin classGraphBuilder.Base<GraphBuilder.Root>- Parameters:
id- property IDproperty- property element- Returns:
- this
-
transformCommands
public GraphBuilder.Root transformCommands(Function<Stream<GraphElement.Command>, List<GraphElement.Command>> transform) Transform the existing commands. The transform function is called with a stream of the existing command elements, and should return a list of desired command elements. The returned list will be used to replace the existing commands.- Parameters:
transform- command transform function- Returns:
- this
-
commands
Immutable snapshot of commands.- Returns:
- commands
-
id
Root ID.- Returns:
- id
-
isSynthetic
public boolean isSynthetic()Query whether the root is synthetic.- Returns:
- true if synthetic
-
build
Build a root element from this builder.- Returns:
- created root element
-