Class NumberRange
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.response.search.facet.value.NumberRange
-
- All Implemented Interfaces:
FacetRangeValue<BigDecimal>,FacetValue
public class NumberRange extends Object implements FacetRangeValue<BigDecimal>
Represents a numeric range facet value
-
-
Constructor Summary
Constructors Constructor Description NumberRange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetCount()The count of documents matching this number rangeBigDecimalgetFrom()The start of the range, optionalIntegergetFromInteger()The raw Integer representation of the facet valueLonggetFromLong()The raw Long representation of the facet valueStringgetName()The range nameBigDecimalgetTo()The end of the range, optionalIntegergetToInteger()The raw Integer representation of the facet valueLonggetToLong()The raw Long representation of the facet valueNumberRangesetCount(Long count)The count of documents matching this number rangeNumberRangesetFrom(BigDecimal from)The start of the range, optionalNumberRangesetName(String name)The range nameNumberRangesetTo(BigDecimal to)The end of the range, optional
-
-
-
Method Detail
-
getToLong
public Long getToLong()
The raw Long representation of the facet value- Returns:
- The Long value
- Throws:
ArithmeticException- if this has a nonzero fractional part, or will not fit in a long
-
getToInteger
public Integer getToInteger()
The raw Integer representation of the facet value- Returns:
- The Integer value
- Throws:
ArithmeticException- if this has a nonzero fractional part, or will not fit in an int
-
getFromLong
public Long getFromLong()
The raw Long representation of the facet value- Returns:
- The Long value
- Throws:
ArithmeticException- if this has a nonzero fractional part, or will not fit in a long
-
getFromInteger
public Integer getFromInteger()
The raw Integer representation of the facet value- Returns:
- The Integer value
- Throws:
ArithmeticException- if this has a nonzero fractional part, or will not fit in an int
-
getFrom
public BigDecimal getFrom()
The start of the range, optional- Specified by:
getFromin interfaceFacetRangeValue<BigDecimal>- Returns:
- the start of the range, or null if no start is defined
-
getTo
public BigDecimal getTo()
The end of the range, optional- Specified by:
getToin interfaceFacetRangeValue<BigDecimal>- Returns:
- the end of the range, or null if no end is defined
-
getCount
public Long getCount()
The count of documents matching this number range- Specified by:
getCountin interfaceFacetValue- Returns:
- the count of documents
-
getName
public String getName()
The range name- Returns:
- the name of the range
-
setFrom
public NumberRange setFrom(BigDecimal from)
The start of the range, optional- Parameters:
from- the start of the range- Returns:
this.
-
setTo
public NumberRange setTo(BigDecimal to)
The end of the range, optional- Parameters:
to- the end of the range- Returns:
this.
-
setCount
public NumberRange setCount(Long count)
The count of documents matching this number range- Parameters:
count- the count of documents- Returns:
this.
-
setName
public NumberRange setName(String name)
The range name- Parameters:
name- the name of the range- Returns:
this.
-
-