public interface ClusterModelStatsComparator extends Comparator<ClusterModelStats>, Serializable
Notice that the Java Comparator interface only has a single method. This method, the compare() method, takes two objects which the Comparator implementation is intended to compare. The compare() method returns an int which signals which of the two objects was larger. The semantics of the return values are:
A negative value means that the first object was smaller than second object. The value 0 means the two objects are equal. A positive value means that the first object was larger than the second object.
Modifier and Type | Method and Description |
---|---|
int |
compare(ClusterModelStats stats1,
ClusterModelStats stats2)
Compare two cluster model stats and determine which stats is preferred.
|
String |
explainLastComparison()
This is a method to get the reason for the last comparison.
|
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
int compare(ClusterModelStats stats1, ClusterModelStats stats2)
compare
in interface Comparator<ClusterModelStats>
stats1
- the first statsstats2
- the second statsString explainLastComparison()