Package com.mxgraph.analysis
Class mxUnionFind.Node
- java.lang.Object
-
- com.mxgraph.analysis.mxUnionFind.Node
-
- Enclosing class:
- mxUnionFind
public class mxUnionFind.Node extends java.lang.ObjectA class that defines the identity of a set.
-
-
Field Summary
Fields Modifier and Type Field Description protected mxUnionFind.NodeparentReference to the parent node.protected intsizeThe size of the tree.
-
Constructor Summary
Constructors Constructor Description Node()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description mxUnionFind.NodegetParent()intgetSize()voidsetParent(mxUnionFind.Node parent)voidsetSize(int size)
-
-
-
Field Detail
-
parent
protected mxUnionFind.Node parent
Reference to the parent node. Root nodes point to themselves.
-
size
protected int size
The size of the tree. Initial value is 1.
-
-
Method Detail
-
getParent
public mxUnionFind.Node getParent()
- Returns:
- Returns the parent node
-
setParent
public void setParent(mxUnionFind.Node parent)
- 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.
-
-