Class FreqIterator

java.lang.Object
org.dmfs.rfc5545.recur.FreqIterator

public final class FreqIterator extends Object
The base frequency iterator for recurrence rules. On every call to next() or nextSet() it returns a new date according to the frequency and interval specified in a recurrence rule.
  • Constructor Details

    • FreqIterator

      public FreqIterator(RecurrenceRule rule, org.dmfs.rfc5545.calendarmetrics.CalendarMetrics calendarMetrics, long start)
      Create a new FreqIterator for the given rule and start date.
      Parameters:
      rule - The rule to iterate.
      start - The first instance to iterate.
  • Method Details

    • next

      public long next()
      Get the next instance. The instances are guaranteed to be strictly increasing in time.

      If the last instance has been iterated, all subsequent calls to this method will return Long.MIN_VALUE.

      Returns:
      An long that specifies the next instance or Long.MIN_VALUE if there are no more instances.