All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.personio.synthetics.model.config.Timeframe.kt Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
package com.personio.synthetics.model.config

import java.time.DayOfWeek
import java.time.LocalTime

class Timeframe private constructor(val from: LocalTime, val to: LocalTime, vararg val days: DayOfWeek) {
    companion object {
        operator fun invoke(
            from: LocalTime,
            to: LocalTime,
            vararg days: DayOfWeek,
        ): Timeframe {
            require(from < to) {
                "From time must be earlier than To time."
            }

            return Timeframe(from, to, *days)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy