Class InternalGeoGridBucket<B extends InternalGeoGridBucket>

java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.geogrid.InternalGeoGridBucket<B>
All Implemented Interfaces:
java.lang.Comparable<InternalGeoGridBucket>, Writeable, org.elasticsearch.common.xcontent.ToXContent, GeoGrid.Bucket, MultiBucketsAggregation.Bucket, HasAggregations
Direct Known Subclasses:
InternalGeoHashGridBucket, InternalGeoTileGridBucket

public abstract class InternalGeoGridBucket<B extends InternalGeoGridBucket>
extends InternalMultiBucketAggregation.InternalBucket
implements GeoGrid.Bucket, java.lang.Comparable<InternalGeoGridBucket>
  • Field Details

    • hashAsLong

      protected long hashAsLong
    • docCount

      protected long docCount
    • aggregations

      protected InternalAggregations aggregations
  • Constructor Details

    • InternalGeoGridBucket

      public InternalGeoGridBucket​(long hashAsLong, long docCount, InternalAggregations aggregations)
    • InternalGeoGridBucket

      public InternalGeoGridBucket​(StreamInput in) throws java.io.IOException
      Read from a stream.
      Throws:
      java.io.IOException
  • Method Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • getDocCount

      public long getDocCount()
      Specified by:
      getDocCount in interface MultiBucketsAggregation.Bucket
      Returns:
      The number of documents that fall within this bucket
    • getAggregations

      public Aggregations getAggregations()
      Specified by:
      getAggregations in interface HasAggregations
      Specified by:
      getAggregations in interface MultiBucketsAggregation.Bucket
      Returns:
      The sub-aggregations of this bucket
    • compareTo

      public int compareTo​(InternalGeoGridBucket other)
      Specified by:
      compareTo in interface java.lang.Comparable<B extends InternalGeoGridBucket>
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object