Class RecurrenceSetIterator

java.lang.Object
org.dmfs.rfc5545.recurrenceset.RecurrenceSetIterator

@Deprecated public class RecurrenceSetIterator extends Object
Deprecated.
An iterator for recurrence sets. It takes a number of AbstractRecurrenceAdapters for instances and exceptions and iterates all resulting instances (i.e. only the instances, not the exceptions).

This class doesn't implement the AbstractRecurrenceAdapter.InstanceIterator interface for one reasons:

  • An AbstractRecurrenceAdapter.InstanceIterator always returns an Object, so instead of a primitive long we would have to return a Long. That is an additional object which doesn't have any advantage.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fastForward(long until)
    Deprecated.
    Fast forward to the next instance at or after the given date.
    boolean
    Deprecated.
    Check if there is at least one more instance to iterate.
    long
    Deprecated.
    Get the next instance of this set.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • hasNext

      public boolean hasNext()
      Deprecated.
      Check if there is at least one more instance to iterate.
      Returns:
      true if the next call to next() will return another instance, false otherwise.
    • next

      public long next()
      Deprecated.
      Get the next instance of this set. Do not call this if hasNext() returns false.
      Returns:
      The time in milliseconds since the epoch of the next instance.
      Throws:
      ArrayIndexOutOfBoundsException - if there are no more instances.
    • fastForward

      public void fastForward(long until)
      Deprecated.
      Fast forward to the next instance at or after the given date.
      Parameters:
      until - The date to fast forward to in milliseconds since the epoch.