public class HlddNode
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HlddNode.NodeType
Type of a node.
|
Constructor and Description |
---|
HlddNode(HlddNode.NodeType type)
Constructs a new node.
|
HlddNode(HlddNode parent,
HlddNode.NodeType type)
Constructs a new node.
|
HlddNode(HlddNode parent,
HlddNode.NodeType type,
java.util.Collection<? extends ru.ispras.fortress.expression.Node> expressions)
Constructs a new node.
|
HlddNode(HlddNode parent,
HlddNode.NodeType type,
ru.ispras.fortress.expression.Node expression)
Constructs a new node.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(HlddNode child)
Adds the specified
HlddNode to the children of the node. |
void |
addChildren(java.util.Collection<HlddNode> children)
Adds the specified collection of
HlddNode to the children of the node. |
void |
addExpression(java.util.Collection<? extends ru.ispras.fortress.expression.Node> expressions)
Adds the specified collection of
Node to the stored expressions. |
void |
addExpression(ru.ispras.fortress.expression.Node expression)
Adds the specified
Node to the stored expressions. |
boolean |
equals(java.lang.Object object) |
java.util.List<HlddNode> |
getChildren()
Returns the children of the node.
|
java.util.List<ru.ispras.fortress.expression.Node> |
getExpressions()
Returns all expressions stored in the node.
|
int |
getLevel()
Returns the level of this node.
|
ru.ispras.fortress.expression.Node |
getOnlyExpression()
Returns the only expression stored in the node.
|
HlddNode |
getParent()
Returns the parent of the node.
|
HlddNode.NodeType |
getType()
Returns the type of the node.
|
int |
hashCode() |
boolean |
isDefault()
Shows whether the node is a default node.
|
boolean |
isRoot()
Shows whether the node is a root node.
|
void |
removeFromChildren(HlddNode node)
Removes the specified parent node from children.
|
void |
setDefault()
Sets the node as a default node.
|
void |
setLevel(int level)
Sets the level of this node.
|
void |
setParent(HlddNode parent)
Sets the specified
HlddNode as the parent node. |
void |
setRoot(boolean root)
Sets the value of a root flag.
|
void |
setType(HlddNode.NodeType type)
Sets the type of the node.
|
java.lang.String |
toString() |
public HlddNode(HlddNode parent, HlddNode.NodeType type, ru.ispras.fortress.expression.Node expression)
parent
- - the specified parent of a node;type
- - the specified type of a node;expression
- - the specified expression.public HlddNode(HlddNode parent, HlddNode.NodeType type, java.util.Collection<? extends ru.ispras.fortress.expression.Node> expressions)
parent
- - the specified parent of a node;type
- - the specified type of a node;expressions
- - the specified expressions.public HlddNode(HlddNode parent, HlddNode.NodeType type)
parent
- - the specified parent of a node;type
- - the specified type of a node.public HlddNode(HlddNode.NodeType type)
type
- - the specified type of a node.public int getLevel()
public void setLevel(int level)
level
- - the specified level in the diagram.public boolean isRoot()
true
if the node is a root node, false
otherwise.public void setRoot(boolean root)
root
- - the specified flag value.public void setDefault()
public boolean isDefault()
true
if the node is a default node, false
otherwise.public HlddNode.NodeType getType()
HlddNode.NodeType
.public void setType(HlddNode.NodeType type)
type
- - the specified HlddNode.NodeType
.public ru.ispras.fortress.expression.Node getOnlyExpression()
null
if no expressions are stored
in the node.public java.util.List<ru.ispras.fortress.expression.Node> getExpressions()
List
containing all expressions.public void addExpression(ru.ispras.fortress.expression.Node expression)
Node
to the stored expressions.expression
- - the specified Node
.public void addExpression(java.util.Collection<? extends ru.ispras.fortress.expression.Node> expressions)
Node
to the stored expressions.expressions
- - the specified collection of Node
.public HlddNode getParent()
public void setParent(HlddNode parent)
HlddNode
as the parent node.parent
- - the specified parent node.public java.util.List<HlddNode> getChildren()
public void addChild(HlddNode child)
HlddNode
to the children of the node.child
- - the specified child node.public void addChildren(java.util.Collection<HlddNode> children)
HlddNode
to the children of the node.children
- - the specified collection of child nodes.public void removeFromChildren(HlddNode node)
node
- - the specified child node.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object