Class NumberRange
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.request.search.range.NumberRange
-
- All Implemented Interfaces:
Range<BigDecimal>
public class NumberRange extends Object implements Range<BigDecimal>
-
-
Constructor Summary
Constructors Constructor Description NumberRange()NumberRange(Double from, Double to)NumberRange(Float from, Float to)NumberRange(Integer from, Integer to)NumberRange(Long from, Long to)NumberRange(String from, String to)NumberRange(BigDecimal from, BigDecimal to)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)BigDecimalgetFrom()Inclusive lower bound of the range.StringgetName()Name given to the rangeBigDecimalgetTo()Exclusive upper bound of the range.inthashCode()NumberRangesetFrom(BigDecimal from)Inclusive lower bound of the range.NumberRangesetName(String name)Name given to the rangeNumberRangesetTo(BigDecimal to)Exclusive upper bound of the range.StringtoString()
-
-
-
Constructor Detail
-
NumberRange
public NumberRange()
-
NumberRange
public NumberRange(BigDecimal from, BigDecimal to)
-
-
Method Detail
-
getFrom
public BigDecimal getFrom()
Inclusive lower bound of the range. Is required if to is not given.- Specified by:
getFromin interfaceRange<BigDecimal>- Returns:
- the lower bound
-
getTo
public BigDecimal getTo()
Exclusive upper bound of the range. Is required if from is not given.- Specified by:
getToin interfaceRange<BigDecimal>- Returns:
- the upper bound
-
getName
public String getName()
Name given to the range- Returns:
- the range name
-
setFrom
public NumberRange setFrom(BigDecimal from)
Inclusive lower bound of the range. Is required if to is not given.- Parameters:
from- the lower bound- Returns:
this.
-
setTo
public NumberRange setTo(BigDecimal to)
Exclusive upper bound of the range. Is required if from is not given.- Parameters:
to- the upper bound- Returns:
this.
-
setName
public NumberRange setName(String name)
Name given to the range- Parameters:
name- the range name- Returns:
this.
-
-