public static class TimeWindow.Companion
@JvmStatic @NotNull public TimeWindow fromOnly(@NotNull java.time.Instant fromTime)
Creates a class TimeWindow with null untilTime, i.e. the time interval [fromTime, ∞). midpoint will return null.
class TimeWindow,
untilTime,
midpoint@JvmStatic @NotNull public TimeWindow untilOnly(@NotNull java.time.Instant untilTime)
Creates a class TimeWindow with null fromTime, i.e. the time interval (∞, untilTime). midpoint will return null.
class TimeWindow,
fromTime,
midpoint@JvmStatic @NotNull public TimeWindow between(@NotNull java.time.Instant fromTime, @NotNull java.time.Instant untilTime)
Creates a class TimeWindow with the time interval [fromTime, untilTime). midpoint will return
fromTime + (untilTime - fromTime) / 2.
IllegalArgumentException - If fromTime ≥ untilTimeclass TimeWindow,
midpoint@JvmStatic @NotNull public TimeWindow fromStartAndDuration(@NotNull java.time.Instant fromTime, @NotNull java.time.Duration duration)
Creates a class TimeWindow with the time interval [fromTime, fromTime + duration). midpoint will return
fromTime + duration / 2
class TimeWindow,
midpoint@JvmStatic @NotNull public TimeWindow withTolerance(@NotNull java.time.Instant instant, @NotNull java.time.Duration tolerance)
Creates a class TimeWindow which is centered around instant with the given tolerance on both sides, i.e the
time interval [instant - tolerance, instant + tolerance). midpoint will return instant.
class TimeWindow,
instant,
tolerance,
midpoint,
instant