DataType
- The type of the data in the cluster.ClusterType
- The type of cluster contained in the hierarchy node.public class BinaryClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>> extends AbstractClusterHierarchyNode<DataType,ClusterType>
Modifier and Type | Field and Description |
---|---|
protected ClusterHierarchyNode<DataType,ClusterType> |
firstChild
The first child node.
|
protected ClusterHierarchyNode<DataType,ClusterType> |
secondChild
The second child node.
|
cluster
Constructor and Description |
---|
BinaryClusterHierarchyNode()
Creates a new
BinaryClusterHierarchyNode . |
BinaryClusterHierarchyNode(ClusterType cluster)
Creates a new
BinaryClusterHierarchyNode . |
BinaryClusterHierarchyNode(ClusterType cluster,
ClusterHierarchyNode<DataType,ClusterType> firstChild,
ClusterHierarchyNode<DataType,ClusterType> secondChild)
Creates a new
BinaryClusterHierarchyNode . |
Modifier and Type | Method and Description |
---|---|
java.util.List<ClusterHierarchyNode<DataType,ClusterType>> |
getChildren()
Gets the children of this node.
|
ClusterHierarchyNode<DataType,ClusterType> |
getFirstChild()
Gets the first child node, if there is one.
|
ClusterHierarchyNode<DataType,ClusterType> |
getSecondChild()
Gets the second child node, if there is one.
|
boolean |
hasChildren()
True if this node has any children.
|
void |
setFirstChild(ClusterHierarchyNode<DataType,ClusterType> firstChild)
Sets the first child node.
|
void |
setSecondChild(ClusterHierarchyNode<DataType,ClusterType> secondChild)
Sets the second child node.
|
getCluster, getMembers, setCluster
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
protected ClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>> firstChild
protected ClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>> secondChild
public BinaryClusterHierarchyNode()
BinaryClusterHierarchyNode
.public BinaryClusterHierarchyNode(ClusterType cluster)
BinaryClusterHierarchyNode
.cluster
- The cluster associated with this node.public BinaryClusterHierarchyNode(ClusterType cluster, ClusterHierarchyNode<DataType,ClusterType> firstChild, ClusterHierarchyNode<DataType,ClusterType> secondChild)
BinaryClusterHierarchyNode
.cluster
- The cluster associated with this node.firstChild
- The first child node.secondChild
- The second child node.public boolean hasChildren()
ClusterHierarchyNode
hasChildren
in interface ClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>>
hasChildren
in class AbstractClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>>
public java.util.List<ClusterHierarchyNode<DataType,ClusterType>> getChildren()
ClusterHierarchyNode
public ClusterHierarchyNode<DataType,ClusterType> getFirstChild()
public void setFirstChild(ClusterHierarchyNode<DataType,ClusterType> firstChild)
firstChild
- The first child node.public ClusterHierarchyNode<DataType,ClusterType> getSecondChild()
public void setSecondChild(ClusterHierarchyNode<DataType,ClusterType> secondChild)
secondChild
- The second child node.