VerdandiRecurrenceMoments

@Serializable
data class VerdandiRecurrenceMoments : List<VerdandiMoment>

Represents the result of a recurrence rule evaluation: a finite, ordered collection of VerdandiMoment instances generated according to a frequency, interval, and optional day-of-week or time-of-day constraints.

This class implements List<VerdandiMoment> via delegation, so it can be used directly in any context that expects a list of moments (iteration, indexing, etc.).

Instances are created exclusively through Verdandi.recurrence:

val fridays: VerdandiRecurrenceMoments = Verdandi.recurrence {
every week on fridays indefinitely
}

val dailyAt9: VerdandiRecurrenceMoments = Verdandi.recurrence(start) {
every day at { 9.hours } until end
}

Properties

Link copied to clipboard

The moment at or before which the last occurrence falls. For indefinite recurrences this equals the last generated occurrence.

Link copied to clipboard
open override val size: Int
Link copied to clipboard

The anchor moment from which the recurrence begins.

Functions

Link copied to clipboard
open operator override fun contains(element: VerdandiMoment): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<VerdandiMoment>): Boolean
Link copied to clipboard

Returns a new VerdandiRecurrenceMoments instance with the specified moments excluded.

Link copied to clipboard

Filters the recurrence moments based on the provided predicate.

Link copied to clipboard

Formats each moment in the recurrence according to the provided block pattern.

Link copied to clipboard
open operator override fun get(index: Int): VerdandiMoment
Link copied to clipboard
open override fun indexOf(element: VerdandiMoment): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<VerdandiMoment>
Link copied to clipboard
open override fun lastIndexOf(element: VerdandiMoment): Int
Link copied to clipboard
open override fun listIterator(index: Int): ListIterator<VerdandiMoment>
Link copied to clipboard

Checks if the given moment matches the recurrence rule and is not excluded.

Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<VerdandiMoment>
Link copied to clipboard

Converts the first and last moments of the recurrence to a VerdandiInterval.

Link copied to clipboard
open override fun toString(): String