Interface KeyComparable<T extends MultiBucketsAggregation.Bucket & KeyComparable<T>>

Type Parameters:
T - MultiBucketsAggregation.Bucket of the same type that also implements KeyComparable.
All Known Implementing Classes:
InternalAutoDateHistogram.Bucket, InternalComposite.InternalBucket, InternalDateHistogram.Bucket, InternalHistogram.Bucket, InternalRareTerms.Bucket, InternalTerms.Bucket, InternalVariableWidthHistogram.Bucket, LongRareTerms.Bucket, LongTerms.Bucket, StringRareTerms.Bucket, StringTerms.Bucket, UnmappedRareTerms.Bucket, UnmappedTerms.Bucket

public interface KeyComparable<T extends MultiBucketsAggregation.Bucket & KeyComparable<T>>
Defines behavior for comparing bucket keys to imposes a total ordering of buckets of the same type.
See Also:
BucketOrder.key(boolean)
  • Method Details

    • compareKey

      int compareKey​(T other)
      Compare this MultiBucketsAggregation.Buckets key with another bucket.
      Parameters:
      other - the bucket that contains the key to compare to.
      Returns:
      a negative integer, zero, or a positive integer as this buckets key is less than, equal to, or greater than the other buckets key.
      See Also:
      Comparable.compareTo(Object)