Package com.mxgraph.analysis
Class mxUnionFind.Node
java.lang.Object
com.mxgraph.analysis.mxUnionFind.Node
- Enclosing class:
- mxUnionFind
A class that defines the identity of a set.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected mxUnionFind.NodeReference to the parent node.protected intThe size of the tree. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetSize()voidsetParent(mxUnionFind.Node parent) voidsetSize(int size)
-
Field Details
-
parent
Reference to the parent node. Root nodes point to themselves. -
size
protected int sizeThe size of the tree. Initial value is 1.
-
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
getParent
- Returns:
- Returns the parent node
-
setParent
- Parameters:
parent- The parent node to set.
-
getSize
public int getSize()- Returns:
- Returns the size.
-
setSize
public void setSize(int size) - Parameters:
size- The size to set.
-