Class Granulator

java.lang.Object
org.bedework.calfacade.util.Granulator

public class Granulator extends Object
Select periods in the Collection of periods which fall within a given time period. By incrementing that time period we can break up the given periods into time periods of a given granularity.

Don't make much sense? Try an example:

The given set of periods is a set of events for the week. The granularity is one day - each call gives events appearing in that day - possibly extending into previous and next days.

Another? The periods are a set of freebusy objects defining busy time for one day. The granularity is 30 minutes. The result is a free busy for a day divided into 30 minute periods.

Author:
Mike Douglass douglm at bedework.edu
  • Method Details

    • getPeriodsEvents

      public static Collection<?> getPeriodsEvents(Granulator.GetPeriodsPars pars)
      Select the events in the collection which fall within the period defined by the start and duration.
      Parameters:
      pars - GetPeriodsPars object
      Returns:
      Collection of EventInfo being one days events or empty for no events.