Class DateRange
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.request.search.range.DateRange
-
- All Implemented Interfaces:
Range<OffsetDateTime>
public class DateRange extends Object implements Range<OffsetDateTime>
-
-
Constructor Summary
Constructors Constructor Description DateRange()DateRange(String from, String to)DateRange(OffsetDateTime from, OffsetDateTime to)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OffsetDateTimegetFrom()Inclusive lower bound of the range.StringgetName()Name given to the rangeOffsetDateTimegetTo()Exclusive upper bound of the range.DateRangesetFrom(OffsetDateTime from)Inclusive lower bound of the range.DateRangesetName(String name)Name given to the rangeDateRangesetTo(OffsetDateTime to)Exclusive upper bound of the range.
-
-
-
Constructor Detail
-
DateRange
public DateRange()
-
DateRange
public DateRange(OffsetDateTime from, OffsetDateTime to)
-
-
Method Detail
-
getFrom
public OffsetDateTime getFrom()
Inclusive lower bound of the range. Is required if to is not given.- Specified by:
getFromin interfaceRange<OffsetDateTime>- Returns:
- the lower bound
-
getTo
public OffsetDateTime getTo()
Exclusive upper bound of the range. Is required if from is not given.- Specified by:
getToin interfaceRange<OffsetDateTime>- Returns:
- the upper bound
-
getName
public String getName()
Name given to the range- Returns:
- the name of the range
-
setFrom
public DateRange setFrom(OffsetDateTime from)
Inclusive lower bound of the range. Is required if to is not given.- Parameters:
from- the lower bound- Returns:
this.
-
setTo
public DateRange setTo(OffsetDateTime to)
Exclusive upper bound of the range. Is required if from is not given.- Parameters:
to- the upper bound- Returns:
this.
-
-