public abstract class AbstractBlock extends AbstractNode implements Block
Modifier and Type | Class and Description |
---|---|
static class |
AbstractBlock.And
Denotes an And block
|
static class |
AbstractBlock.Def
Denotes an deferred choice block
|
static class |
AbstractBlock.DefLoop
Denotes an deferred choice loop block
|
static class |
AbstractBlock.Or
Denotes an Or block
|
static class |
AbstractBlock.PlaceHolder
Denotes an PlaceHolder block
|
static class |
AbstractBlock.Seq
Denotes a sequence block
|
static class |
AbstractBlock.Xor
Denotes an Xor block
|
static class |
AbstractBlock.XorLoop
Denotes a Xor Loop block
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
changeable |
protected java.util.List<Edge> |
outgoing |
incoming, readVars, remReadVars, remWriteVars, tree, writeVars
id, name, propertyDependent, propertyIndependent
Constructor and Description |
---|
AbstractBlock(Block b) |
AbstractBlock(java.lang.String name) |
AbstractBlock(java.lang.String name,
java.util.List<Edge> incoming,
java.util.List<Edge> outgoing) |
AbstractBlock(java.util.UUID id,
java.lang.String name) |
AbstractBlock(java.util.UUID id,
java.lang.String name,
java.util.List<Edge> incoming,
java.util.List<Edge> outgoing) |
Modifier and Type | Method and Description |
---|---|
Edge |
addChild(Node child)
adds a child as the new rightmost child of the node
|
Edge |
addChild(Node child,
Expression expression)
adds a child as the new rightmost child of the node
|
Edge |
addChildAt(Node child,
Expression expression,
int index)
adds a child as a new child of the node at the given index.
|
Edge |
addChildAt(Node child,
int index)
adds a child as a new child of the node at the given index.
|
void |
addOutgoingEdge(Edge edge)
Adds an outgoing edge to the node
|
void |
addOutgoingEdgeAt(Edge edge,
int index)
Adds an outgoing edge to the node
|
java.util.List<Node> |
getChildren()
returns an ordered list of nodes that are the children of this node in
the tree
changes to the collection are NOT reflected in the tree
|
java.util.List<Edge> |
getOutgoingEdges()
returns an immutable (nonempty) list outgoing edges.
|
java.util.Collection<Variable> |
getReadVariablesRecursive()
returns the collection of variables read in this subgraph
|
java.util.Collection<Variable> |
getWrittenVariablesRecursive()
returns the collection of variables written in this subgraph
|
boolean |
isChangeable()
returns true if and only this block is changeable (note it is false by definition for events)
|
boolean |
isLeaf()
returns true if this node is a leaf node.
|
java.util.Iterator<Node> |
iterator()
returns an iterator over the children of a block.
|
int |
numChildren()
returns the number of children.
|
void |
removeOutgoingEdge(Edge edge)
Removes and outgoing edge from the node
|
void |
setChangeable(boolean changeable)
sets this block to be (non-)changeable
|
Edge |
swapChildAt(Node child,
Expression expression,
int index)
removes the child at the given index and adds a new one in its place.
|
Edge |
swapChildAt(Node child,
int index)
removes the child at the given index and adds a new one in its place.
|
java.lang.String |
toString() |
addIncomingEdge, addParent, addParent, addParent, addParent, addReadVariable, addRemovableReadVariable, addRemovableWriteVariable, addWriteVariable, getID, getIncomingEdges, getName, getParents, getProcessTree, getReadVariables, getRemovableReadVariables, getRemovableWrittenVariables, getWrittenVariables, isRoot, numParents, removeIncomingEdge, removeReadVariable, removeRemovableReadVariable, removeRemovableWriteVariable, removeWriteVariable, setProcessTree
equals, getDependentProperties, getDependentProperty, getDependentProperty, getIndependentProperties, getIndependentProperty, getIndependentProperty, hashCode, removeDependentProperty, removeDependentProperty, removeIndependentProperty, removeIndependentProperty, setDependentProperty, setDependentProperty, setIndependentProperty, setIndependentProperty, setName
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
expressionsOfOutgoingEdgesMatter, orderingOfChildernMatters
addIncomingEdge, addParent, addParent, addParent, addReadVariable, addRemovableReadVariable, addRemovableWriteVariable, addWriteVariable, getIncomingEdges, getParents, getProcessTree, getReadVariables, getRemovableReadVariables, getRemovableWrittenVariables, getWrittenVariables, isRoot, numParents, removeIncomingEdge, removeReadVariable, removeRemovableReadVariable, removeRemovableWriteVariable, removeWriteVariable, setProcessTree, toStringShort
getDependentProperties, getDependentProperty, getDependentProperty, getID, getIndependentProperties, getIndependentProperty, getIndependentProperty, getName, removeDependentProperty, removeDependentProperty, removeIndependentProperty, removeIndependentProperty, setDependentProperty, setDependentProperty, setIndependentProperty, setIndependentProperty, setName
protected final java.util.List<Edge> outgoing
protected boolean changeable
public AbstractBlock(java.lang.String name)
public AbstractBlock(java.util.UUID id, java.lang.String name)
public AbstractBlock(java.lang.String name, java.util.List<Edge> incoming, java.util.List<Edge> outgoing)
public AbstractBlock(java.util.UUID id, java.lang.String name, java.util.List<Edge> incoming, java.util.List<Edge> outgoing)
public AbstractBlock(Block b)
public java.util.Collection<Variable> getReadVariablesRecursive()
Node
getReadVariablesRecursive
in interface Node
public java.util.Collection<Variable> getWrittenVariablesRecursive()
Node
getWrittenVariablesRecursive
in interface Node
public java.util.List<Edge> getOutgoingEdges()
Block
getOutgoingEdges
in interface Block
public void addOutgoingEdge(Edge edge)
Block
addOutgoingEdge
in interface Block
public void removeOutgoingEdge(Edge edge)
Block
removeOutgoingEdge
in interface Block
public void addOutgoingEdgeAt(Edge edge, int index)
Block
addOutgoingEdgeAt
in interface Block
public boolean isLeaf()
Node
public boolean isChangeable()
Block
isChangeable
in interface Block
public void setChangeable(boolean changeable)
Block
setChangeable
in interface Block
public Edge addChild(Node child, Expression expression)
Block
public Edge addChild(Node child)
Block
public Edge addChildAt(Node child, Expression expression, int index)
Block
addChildAt
in interface Block
public Edge addChildAt(Node child, int index)
Block
addChildAt
in interface Block
public Edge swapChildAt(Node child, Expression expression, int index)
Block
swapChildAt
in interface Block
public Edge swapChildAt(Node child, int index)
Block
swapChildAt
in interface Block
public java.util.List<Node> getChildren()
Block
getChildren
in interface Block
public java.util.Iterator<Node> iterator()
Block
public int numChildren()
Block
numChildren
in interface Block
public java.lang.String toString()
toString
in class AbstractNode