Class TimeWindow

  • All Implemented Interfaces:
    java.io.Serializable

    public final class TimeWindow
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Method Detail

      • compareByStartTime

        public static java.util.Comparator<TimeWindow> compareByStartTime()
      • compareByEndTime

        public static java.util.Comparator<TimeWindow> compareByEndTime()
      • compareByStartAndEndTime

        public static java.util.Comparator<TimeWindow> compareByStartAndEndTime()
      • between

        public static TimeWindow between​(long startNanos,
                                         long endNanos)
      • after

        public static TimeWindow after​(long startNanos)
      • after

        public static TimeWindow after​(java.time.Instant start)
      • before

        public static TimeWindow before​(long endNanos)
      • before

        public static TimeWindow before​(java.time.Instant end)
      • between

        public static TimeWindow between​(java.time.Instant startTime,
                                         java.time.Instant endTime)
      • fromStrings

        public static TimeWindow fromStrings​(java.lang.String startTime,
                                             java.lang.String endTime)
      • getStartTimeNanos

        public long getStartTimeNanos()
      • getEndTimeNanos

        public long getEndTimeNanos()
      • contains

        public boolean contains​(java.time.Instant instant)
      • contains

        public boolean contains​(long time)
      • bounds

        public boolean bounds​(TimeWindow window)
      • intersects

        public boolean intersects​(TimeWindow window)
      • leftLimit

        public TimeWindow leftLimit​(java.time.Instant limit)
      • rightLimit

        public TimeWindow rightLimit​(java.time.Instant limit)
      • isWithinRangeRightExcluded

        public boolean isWithinRangeRightExcluded​(@NonNull
                                                  @lombok.NonNull long nanos)
      • isEmpty

        public boolean isEmpty()
      • isFinite

        public boolean isFinite()
      • isInfinite

        public boolean isInfinite()
      • isLeftInfinite

        public boolean isLeftInfinite()
      • isRightInfinite

        public boolean isRightInfinite()
      • mergeTimeWindows

        public static java.util.Set<TimeWindow> mergeTimeWindows​(java.util.Collection<TimeWindow> windows)
      • getStartTime

        public java.time.Instant getStartTime()
      • getEndTime

        public java.time.Instant getEndTime()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object