Class FixedStepSelector
- All Implemented Interfaces:
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.
BEWARE! This class stores internally the last selected dates, so it is neither
reusable across several fixed step or continuous schedulers, nor thread-safe. A separate selector should be used for each
scheduler and for each thread in multi-threading context.
- Since:
- 9.3
- Author:
- Luc Maisonobe
-
Constructor Summary
ConstructorsConstructorDescriptionFixedStepSelector(double step, TimeScale alignmentTimeScale) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionselectDates(AbsoluteDate start, AbsoluteDate end) Select dates within an interval.
-
Constructor Details
-
FixedStepSelector
Simple constructor.- Parameters:
step- step between two consecutive dates (s)alignmentTimeScale- alignment time scale (null is alignment is not needed)
-
-
Method Details
-
selectDates
Select dates within an interval.The
startandenddate may be either in direct or reverse chronological order. The list is produced in the same order asstartandend, i.e. direct chronological order ifstartis earlier thanendor reverse chronological order ifstartis later thanend.The ordering (direct or reverse chronological order) should not be changed between calls, otherwise unpredictable results may occur.
- Specified by:
selectDatesin interfaceDatesSelector- Parameters:
start- interval startend- interval end- Returns:
- selected dates within this interval
-