- Type Parameters:
T- Type of elements contained by the clusters
- All Superinterfaces:
- All Known Subinterfaces:
@Beta @PublicAPI public interface HierarchicCluster<T> extends Cluster<T>Represents a group (cluster) of structures, possibly divided into further non overlapping clusters.
Further division is also possibly hierarchic. The further division is represented by the child clusters, returned by
Leaves (elements referenced by this cluster but not by others) are also directly available
The represented group is immutable, so
Listmodification operators are not supported, they throw
Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
List<? extends HierarchicCluster<T>>
clusters()Access further grouping of the represented elements.
depth()Distance from the associated root.
height()Distance from the farthest leave.
immediateDescendantsCount()Sum of child clusters count and leaves count.
leaves()Access immediate leaves associated to this node.
com.google.common.base.Optional<? extends HierarchicCluster<T>>
parent()Get parent for non roots.
List<? extends HierarchicCluster<T>> clusters()Access further grouping of the represented elements.
- List of child clusters. The returned list is empty when no child clusters contained.
leavesAccess immediate leaves associated to this node.
Note that representant structure
Cluster.representant()might be part of the leaves of this cluster or any of its child clusters leaves.
- List of leaves. The returned list is empty when no leaves associated (all represented nodes are further clustered).
int depth()Distance from the associated root. Note that interpretation is similar to D3's
- Zero for a root node having no parent, otherwise
depth()of parent plus one
int height()Distance from the farthest leave. Note that interpretation is similar to D3's
node.heightfor internal nodes.
int immediateDescendantsCount()Sum of child clusters count and leaves count.
- Sum of leaves and immediate children count