Class CalendarMap<T>
java.lang.Object
io.gitbub.devlibx.easy.helper.calendar.CalendarMap<T>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCalendarMap(int days) Create a map for calendar days (starting from today) - for last N daysCalendarMap(org.joda.time.DateTime from, int days) Create a map for calendar days - for last N days -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidexecuteForAll(CalendarMap.Callback<T> processFunc) voidexecuteForKey(KeyGenerator.IKeyFunc keyFunc, org.joda.time.DateTime time, CalendarMap.Callback<T> processFunc) Call function (callback) for given time (will use month and day of the given time for key )voidexecuteForKey(String key, CalendarMap.Callback<T> processFunc) Call function (callback) for given keyvoidexecuteForKey(org.joda.time.DateTime time, CalendarMap.Callback<T> processFunc) Call function (callback) for given time (will use month and day of the given time for key )static <T> CalendarMap<T> Helper to create calendar map for month given by the timestatic <T> CalendarMap<T> forThisMonth(Class<T> cls) Helper to create calendar map for this monthgetDataByKey(String key) Get data for given keygetDataByTime(org.joda.time.DateTime time) Get data for given time
-
Constructor Details
-
CalendarMap
public CalendarMap(org.joda.time.DateTime from, int days) Create a map for calendar days - for last N days- Parameters:
from- starting datedays- last N days
-
CalendarMap
public CalendarMap(int days) Create a map for calendar days (starting from today) - for last N days- Parameters:
days- last N days
-
-
Method Details
-
forThisMonth
Helper to create calendar map for this month -
forMonth
Helper to create calendar map for month given by the time -
executeForKey
Call function (callback) for given key -
executeForKey
public void executeForKey(KeyGenerator.IKeyFunc keyFunc, org.joda.time.DateTime time, CalendarMap.Callback<T> processFunc) Call function (callback) for given time (will use month and day of the given time for key ) -
executeForKey
Call function (callback) for given time (will use month and day of the given time for key ) -
executeForAll
-
getDataByKey
Get data for given key -
getDataByTime
Get data for given time -
add
-
add
-