T
- Type of elements contained by the clusters@Beta @PublicAPI public interface Cluster<T>
An instance of Cluster
is considered a List
of represented/referenced (nonnegative)
structure IDs.
The represented group is immutable, so List
modification operators are not supported, they throw
UnsupportedOperationException
upon calling.
Please note that this interface is marked with Beta
annotation, so it can be subject of incompatible
changes or removal in later releases.
Modifier and Type | Method and Description |
---|---|
int |
memberCount()
Represented member count of this cluster.
|
List<T> |
members()
Represented members of this cluster.
|
T |
representant()
Cluster representant member.
|
List<T> members()
Please note that members list in case of a hierarchic clustering might be constructed on-the-fly as the union
of the immediate leaves and the members of the child clusters. To get member count access memberCount()
which is expected to execute efficiently.
int memberCount()
List.size()
of members()
.