Class ParsedRange.ParsedBucket
java.lang.Object
org.elasticsearch.search.aggregations.ParsedMultiBucketAggregation.ParsedBucket
org.elasticsearch.search.aggregations.bucket.range.ParsedRange.ParsedBucket
- All Implemented Interfaces:
ToXContent,MultiBucketsAggregation.Bucket,Range.Bucket,HasAggregations
- Direct Known Subclasses:
ParsedDateRange.ParsedBucket,ParsedGeoDistance.ParsedBucket
- Enclosing class:
- ParsedRange
public static class ParsedRange.ParsedBucket extends ParsedMultiBucketAggregation.ParsedBucket implements Range.Bucket
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields Modifier and Type Field Description protected doublefromprotected java.lang.StringfromAsStringprotected java.lang.Stringkeyprotected doubletoprotected java.lang.StringtoAsString -
Constructor Summary
Constructors Constructor Description ParsedBucket() -
Method Summary
Modifier and Type Method Description java.lang.ObjectgetFrom()java.lang.StringgetFromAsString()java.lang.StringgetKey()java.lang.StringgetKeyAsString()java.lang.ObjectgetTo()java.lang.StringgetToAsString()protected static <B extends ParsedRange.ParsedBucket>
BparseRangeBucketXContent(XContentParser parser, java.util.function.Supplier<B> bucketSupplier, boolean keyed)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)Methods inherited from class org.elasticsearch.search.aggregations.ParsedMultiBucketAggregation.ParsedBucket
getAggregations, getDocCount, isKeyed, keyToXContent, parseXContent, setAggregations, setDocCount, setKeyAsString, setKeyedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket
getAggregations, getDocCount
-
Field Details
-
key
protected java.lang.String key -
from
protected double from -
fromAsString
protected java.lang.String fromAsString -
to
protected double to -
toAsString
protected java.lang.String toAsString
-
-
Constructor Details
-
ParsedBucket
public ParsedBucket()
-
-
Method Details
-
getKey
public java.lang.String getKey()- Specified by:
getKeyin interfaceMultiBucketsAggregation.Bucket- Returns:
- The key associated with the bucket
-
getKeyAsString
public java.lang.String getKeyAsString()- Specified by:
getKeyAsStringin interfaceMultiBucketsAggregation.Bucket- Overrides:
getKeyAsStringin classParsedMultiBucketAggregation.ParsedBucket- Returns:
- The key associated with the bucket as a string
-
getFrom
public java.lang.Object getFrom()- Specified by:
getFromin interfaceRange.Bucket- Returns:
- The lower bound of the range
-
getFromAsString
public java.lang.String getFromAsString()- Specified by:
getFromAsStringin interfaceRange.Bucket- Returns:
- The string value for the lower bound of the range
-
getTo
public java.lang.Object getTo()- Specified by:
getToin interfaceRange.Bucket- Returns:
- The upper bound of the range (excluding)
-
getToAsString
public java.lang.String getToAsString()- Specified by:
getToAsStringin interfaceRange.Bucket- Returns:
- The string value for the upper bound of the range (excluding)
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Overrides:
toXContentin classParsedMultiBucketAggregation.ParsedBucket- Throws:
java.io.IOException
-
parseRangeBucketXContent
protected static <B extends ParsedRange.ParsedBucket> B parseRangeBucketXContent(XContentParser parser, java.util.function.Supplier<B> bucketSupplier, boolean keyed) throws java.io.IOException- Throws:
java.io.IOException
-