Class CalendarMap<T>

java.lang.Object
io.gitbub.devlibx.easy.helper.calendar.CalendarMap<T>

public class CalendarMap<T> extends Object
  • 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 date
      days - 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

      public static <T> CalendarMap<T> forThisMonth(Class<T> cls)
      Helper to create calendar map for this month
    • forMonth

      public static <T> CalendarMap<T> forMonth(org.joda.time.DateTime time, Class<T> cls)
      Helper to create calendar map for month given by the time
    • executeForKey

      public void executeForKey(String key, CalendarMap.Callback<T> processFunc)
      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

      public void executeForKey(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 )
    • executeForAll

      public void executeForAll(CalendarMap.Callback<T> processFunc)
    • getDataByKey

      public T getDataByKey(String key)
      Get data for given key
    • getDataByTime

      public T getDataByTime(org.joda.time.DateTime time)
      Get data for given time
    • add

      public boolean add(String key, T t)
    • add

      public boolean add(org.joda.time.DateTime time, T t)