Class RangeAggregator.Range
java.lang.Object
org.elasticsearch.search.aggregations.bucket.range.RangeAggregator.Range
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
- Direct Known Subclasses:
GeoDistanceAggregationBuilder.Range
- Enclosing class:
- RangeAggregator
public static class RangeAggregator.Range extends java.lang.Object implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description protected doublefromstatic org.elasticsearch.common.ParseFieldFROM_FIELDprotected java.lang.StringfromAsStrprotected java.lang.Stringkeystatic org.elasticsearch.common.ParseFieldKEY_FIELDstatic org.elasticsearch.common.xcontent.ConstructingObjectParser<RangeAggregator.Range,java.lang.Void>PARSERprotected doubletostatic org.elasticsearch.common.ParseFieldTO_FIELDprotected java.lang.StringtoAsStr -
Constructor Summary
Constructors Constructor Description Range(java.lang.String key, java.lang.Double from, java.lang.Double to)Range(java.lang.String key, java.lang.Double from, java.lang.String fromAsStr, java.lang.Double to, java.lang.String toAsStr)Build the range.Range(java.lang.String key, java.lang.String from, java.lang.String to)Range(StreamInput in)Read from a stream. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)doublegetFrom()java.lang.StringgetFromAsString()java.lang.StringgetKey()doublegetTo()java.lang.StringgetToAsString()inthashCode()java.lang.StringtoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Field Details
-
KEY_FIELD
public static final org.elasticsearch.common.ParseField KEY_FIELD -
FROM_FIELD
public static final org.elasticsearch.common.ParseField FROM_FIELD -
TO_FIELD
public static final org.elasticsearch.common.ParseField TO_FIELD -
key
protected final java.lang.String key -
from
protected final double from -
fromAsStr
protected final java.lang.String fromAsStr -
to
protected final double to -
toAsStr
protected final java.lang.String toAsStr -
PARSER
public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<RangeAggregator.Range,java.lang.Void> PARSER
-
-
Constructor Details
-
Range
public Range(java.lang.String key, java.lang.Double from, java.lang.String fromAsStr, java.lang.Double to, java.lang.String toAsStr)Build the range. Generally callers should preferRange(String, Double, Double)orRange(String, String, String). If you must call this know that consumers preferfromandtoparameters if they are non-null and finite. Otherwise they parse fromfromrStrandtoStr. -
Range
public Range(java.lang.String key, java.lang.Double from, java.lang.Double to) -
Range
public Range(java.lang.String key, java.lang.String from, java.lang.String to) -
Range
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
getFrom
public double getFrom() -
getTo
public double getTo() -
getFromAsString
public java.lang.String getFromAsString() -
getToAsString
public java.lang.String getToAsString() -
getKey
public java.lang.String getKey() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
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:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-