DatesSelector
public class FixedStepSelector extends Object implements DatesSelector
The dates can be aligned to whole steps in some time scale. So for example
if a step of 60s is used and the alignment time scale is set to
UTC
, dates will be selected
at whole minutes in UTC time.
This class stores internally the last selected dates, so it is not thread-safe. A separate selector should be used for each thread in multi-threading context.
Constructor | Description |
---|---|
FixedStepSelector(double step,
TimeScale alignmentTimeScale) |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
List<AbsoluteDate> |
selectDates(AbsoluteDate start,
AbsoluteDate end) |
Select dates within an interval.
|
public FixedStepSelector(double step, TimeScale alignmentTimeScale)
step
- step between two consecutive dates (s)alignmentTimeScale
- alignment time scale (null is alignment is not needed)public List<AbsoluteDate> selectDates(AbsoluteDate start, AbsoluteDate end)
The start
and end
date may be either in direct or reverse
chronological order. The list is produced in the same order as start
and end
, i.e. direct chronological order if start
is earlier
than end
or reverse chronological order if start
is later
than end
.
The ordering (direct or reverse chronological order) should not be changed between calls, otherwise unpredictable results may occur.
selectDates
in interface DatesSelector
start
- interval startend
- interval endCopyright © 2002-2019 CS Systèmes d'information. All rights reserved.