
@startuml

    !include lexakai.theme
    
    title "diagram-time"
    
    abstract BaseTime
    
    interface AsString
    interface Comparable
    interface Minimizable
    interface Maximizable
    interface LengthOfTime
    interface DoubleValued
    
    BaseTime <|-- DayOfWeek
    class DayOfWeek
    {
        --(constructors)--
        #DayOfWeek()
        #DayOfWeek(int)
        --(conversion)--
        +int asIsoOrdinal()
        +int asJavaOrdinal()
        --(time)--
        +Day asDay()
        +HourOfWeek asHourOfWeek()
        +java.time.DayOfWeek asJavaDayOfWeek()
        +HourOfWeek at(Hour)
        +ObjectList<DayOfWeek> daysOfWeek()
        +DayOfWeek isoDayOfWeek(int day)
        +DayOfWeek javaDayOfWeek(java.time.DayOfWeek)
        +DayOfWeek javaDayOfWeek(int day)
    }
    
    LengthOfTime <|-- Duration
    DoubleValued <|-- Duration
    class Duration
    {
        --(constructors)--
        #Duration(Nanoseconds, Restriction)
        --(math)--
        +boolean isMaximum()
        +Percent percentageOf(Duration that)
        --(time)--
        +Frequency asFrequency()
        +Duration cpuTime()
        +Duration days(double days)
        +Duration days(double days, Restriction)
        +Duration hours(double hours, Restriction)
        +Duration hours(double hours)
        +Duration longerBy(Percent percentage)
        +Duration maximum(Duration that)
        +Duration microseconds(double microseconds, Restriction)
        +Duration microseconds(double microseconds)
        +Duration milliseconds(double milliseconds)
        +Duration milliseconds(double milliseconds, Restriction)
        +Duration minimum(Duration that)
        +Duration minus(Duration that)
        +Duration minus(Duration that, Restriction)
        +Duration minutes(double minutes)
        +Duration minutes(double minutes, Restriction)
        +Duration nanoseconds(double nanoseconds)
        +Duration nanoseconds(Nanoseconds)
        +Duration nanoseconds(Nanoseconds, Restriction)
        +Duration nanoseconds(double nanoseconds, Restriction)
        +Duration nearestHour()
        +Duration nearestMinute()
        +Duration parseDuration(String text)
        +Duration parseDuration(Listener, String text)
        +Duration plus(Duration that)
        +Duration plus(Duration that, Restriction)
        +Duration seconds(double seconds, Restriction)
        +Duration seconds(double seconds)
        +Duration shorterBy(Percent percentage)
        +Duration untilNextSecond()
        +Duration weeks(double weeks)
        +Duration weeks(double weeks, Restriction)
        +Duration years(double years, Restriction)
        +Duration years(double years)
    }
    
    class Frequency
    {
        --(constructors)--
        #Frequency(Duration)
        --(time)--
        +Duration cycleLength()
        +Frequency cyclesPerDay(int times)
        +Frequency cyclesPerHour(int times)
        +Frequency cyclesPerMinute(int times)
        +Frequency cyclesPerSecond(int times)
        +Frequency every(Duration)
        +Frequency parseFrequency(Listener, String text)
        +Cycle startingAt(Time start)
        +Cycle startingNow()
    }
    
    class KivaKitTimeFormats
    {
    }
    
    Time <|-- LocalTime
    class LocalTime
    {
        --(constructors)--
        #LocalTime()
        #LocalTime(ZoneId, Nanoseconds)
        #LocalTime(ZoneId, Time)
        --
        +Quarter calendarQuarter()
        +Quarter fiscalQuarter()
        +Meridiem meridiem()
        +int weekOfYear()
        +Year year()
        --(conversion)--
        +String asDateString()
        +String asDateString(ZoneId)
        --(time)--
        +String asDateTimeSecondsString()
        +String asDateTimeSecondsString(ZoneId)
        +String asDateTimeString(ZoneId)
        +String asDateTimeString()
        +LocalDateTime asJavaLocalDateTime()
        +java.time.LocalTime asJavaLocalTime()
        +ZonedDateTime asJavaZonedDate()
        +ZonedDateTime asJavaZonedDateTime(ZoneOffset)
        +String asTimeString(ZoneId)
        +String asTimeString()
        +long asZonedMilliseconds()
        +Day dayOfMonth()
        +Day dayOfUnixEpoch()
        +DayOfWeek dayOfWeek()
        +Day dayOfYear()
        +Hour hourOfDay()
        +HourOfWeek hourOfWeek()
        +LocalTime localTime(DateTimeFormatter, String text)
        +LocalTime localTime(ZoneId, Year, Month, Day dayOfMonth)
        +LocalTime localTime(ZoneId, Year, Month)
        +LocalTime localTime(ZonedDateTime)
        +LocalTime localTime(String text)
        +LocalTime localTime(String text, ZoneId)
        +LocalTime localTime(ZoneId, BaseTime<?>)
        +LocalTime localTime(ZoneId, Year, Month, Day dayOfMonth, Hour)
        +LocalTime localTime(ZoneId, Year, Month, Day dayOfMonth, Hour, Minute, Second)
        +LocalTime localTime(ZoneId, LocalDateTime)
        +LocalTime localTime(DateTimeFormatter, String text, ZoneId)
        +ZoneId localTimeZone()
        +LocalTime milliseconds(ZoneId, long epochMilliseconds)
        +LocalTime milliseconds(ZoneId, double epochMilliseconds)
        +Minute minute()
        +int minuteOfDay()
        +Minute minuteOfHour()
        +Month month()
        +LocalTime nanoseconds(ZoneId, Nanoseconds epochNanoseconds)
        +LocalTime now()
        +Time parseLocalTime(Listener, DateTimeFormatter, String text)
        +LocalTime parseLocalTime(Listener, DateTimeFormatter, String text, ZoneId)
        +LocalTime parseLocalTime(Listener, String text)
        +LocalTime parseLocalTime(Listener, String text, ZoneId)
        +LocalTime seconds(ZoneId, long epochSeconds)
        +LocalTime startOfDay()
        +LocalTime startOfHour()
        +LocalTime startOfNextHour()
        +LocalTime startOfTomorrow()
        +ZoneId utcTimeZone()
        +LocalTime withDay(Day)
        +LocalTime withDayOfWeek(DayOfWeek)
        +LocalTime withHourOfDay(Hour)
        +LocalTime withMinute(Minute)
        +LocalTime withUnixEpochDay(Day epochDay)
    }
    
    enum Meridiem
    {
        AM
        NO_MERIDIEM
        PM
    }
    
    interface Modifiable
    {
        --(time)--
        +boolean lastModified(Time)
    }
    
    Comparable <|-- Rate
    Maximizable <|-- Rate
    Minimizable <|-- Rate
    DoubleValued <|-- Rate
    AsString <|-- Rate
    class Rate
    {
        --(constructors)--
        +Rate(double, Duration)
        --
        +Rate perYear()
        +Rate perYear(double count)
        +void throttle(Rate maximumRate)
        --(checks)--
        +boolean isFasterThan(Rate that)
        +boolean isSlowerThan(Rate that)
        --(collection)--
        +double count()
        --(math)--
        +Rate plus(Rate that)
        --(time)--
        +String asBytesPerSecond()
        +Rate perDay(double count)
        +Rate perDay()
        +Rate perHour(double count)
        +Rate perHour()
        +Rate perMinute(double count)
        +Rate perMinute()
        +Rate perSecond(double count)
        +Rate perSecond()
    }
    
    BaseTime <|-- Time
    class Time
    {
        --(constructors)--
        #Time()
        #Time(Nanoseconds)
        --(checks)--
        +boolean isLocal()
        +boolean isNewerThan(Time that)
        +boolean isNewerThan(Duration)
        +boolean isNewerThanOrEqual(Duration)
        +boolean isNewerThanOrEqualTo(Time that)
        +boolean isOlderThan(Time that)
        +boolean isOlderThan(Duration)
        +boolean isOlderThanOrEqual(Duration)
        +boolean isOlderThanOrEqualTo(Time that)
        --(time)--
        +LocalTime asLocalFilesystemTime()
        +LocalTime asLocalFilesystemTime(ZoneId)
        +LocalTime asLocalTime(ZoneId)
        +LocalTime asLocalTime()
        +Time asUtc()
        +Duration elapsedSince(Time that)
        +Duration elapsedSince()
        +Time epochMilliseconds(String milliseconds)
        +Time epochMilliseconds(long milliseconds)
        +Time epochNanoseconds(Nanoseconds)
        +Duration leftUntil(Duration elapsed)
        +Time milliseconds(String milliseconds)
        +Time now()
        +Time parseMilliseconds(Listener, String milliseconds)
        +Time parseTime(Listener, String text)
        +Time time(String text)
        +ZoneId timeZone()
        +Duration until(Time that)
        +Duration untilNow()
        +Time utcTime(Year, Month, Day dayOfMonth, Hour, Minute, Second)
        +Time utcTime(Year, Month, Day dayOfMonth)
        +Time utcTime(Year, Month, Day dayOfMonth, Hour)
        +Time utcTime(Year, Month)
    }
    
    class TimeZones
    {
        --(checks)--
        +boolean isUtc(ZoneId)
        --(identity)--
        +boolean isValidZoneId(String identifier)
        +ZoneId parseZoneId(Listener, String identifier)
        +ZoneId utc()
    }
    
@enduml

