Class CountLimitedRecurrenceRuleIterator

java.lang.Object
org.dmfs.rfc5545.instanceiterator.CountLimitedRecurrenceRuleIterator
All Implemented Interfaces:
Iterator<org.dmfs.rfc5545.DateTime>, InstanceIterator

public final class CountLimitedRecurrenceRuleIterator extends Object implements InstanceIterator
An InstanceIterator which limits the number of iterated instances.
  • Constructor Details

    • CountLimitedRecurrenceRuleIterator

      public CountLimitedRecurrenceRuleIterator(RecurrenceRuleIterator delegate, int remaining)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<org.dmfs.rfc5545.DateTime>
    • next

      public org.dmfs.rfc5545.DateTime next()
      Specified by:
      next in interface Iterator<org.dmfs.rfc5545.DateTime>
    • fastForward

      public void fastForward(org.dmfs.rfc5545.DateTime until)
      Description copied from interface: InstanceIterator
      Skip all occurrences until until. If until is an occurrence itself it will be the next iterated occurrence. If the rule doesn't recur till that date the next call to Iterator.hasNext() will return false.
      Specified by:
      fastForward in interface InstanceIterator