Module org.elasticsearch.server
Class InternalHistogram.Bucket
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucketWritable
org.elasticsearch.search.aggregations.bucket.histogram.AbstractHistogramBucket
org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Bucket
- All Implemented Interfaces:
Writeable,MultiBucketsAggregation.Bucket,KeyComparable<InternalHistogram.Bucket>
- Enclosing class:
InternalHistogram
public static class InternalHistogram.Bucket
extends AbstractHistogramBucket
implements KeyComparable<InternalHistogram.Bucket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.bucket.histogram.AbstractHistogramBucket
aggregations, docCount, format -
Constructor Summary
ConstructorsConstructorDescriptionBucket(double key, long docCount, DocValueFormat format, InternalAggregations aggregations) -
Method Summary
Modifier and TypeMethodDescriptionintCompare thisMultiBucketsAggregation.Bucketskeywith another bucket.booleangetKey()inthashCode()static InternalHistogram.BucketreadFrom(StreamInput in, DocValueFormat format) Read from a stream.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.bucket.histogram.AbstractHistogramBucket
getAggregations, getDocCount, getFormatterMethods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getProperty
-
Constructor Details
-
Bucket
-
-
Method Details
-
readFrom
public static InternalHistogram.Bucket readFrom(StreamInput in, DocValueFormat format) throws IOException Read from a stream.- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getKeyAsString
- Specified by:
getKeyAsStringin interfaceMultiBucketsAggregation.Bucket- Returns:
- The key associated with the bucket as a string
-
getKey
- Specified by:
getKeyin interfaceMultiBucketsAggregation.Bucket- Returns:
- The key associated with the bucket
-
compareKey
Description copied from interface:KeyComparableCompare thisMultiBucketsAggregation.Bucketskeywith another bucket.- Specified by:
compareKeyin interfaceKeyComparable<InternalHistogram.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:
-