Package cern.nxcals.api.domain
Class TimeWindow
- java.lang.Object
-
- cern.nxcals.api.domain.TimeWindow
-
- All Implemented Interfaces:
java.io.Serializable
public final class TimeWindow extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TimeWindow
after(long startNanos)
static TimeWindow
before(long endNanos)
static TimeWindow
between(long startNanos, long endNanos)
static TimeWindow
between(java.time.Instant startTime, java.time.Instant endTime)
boolean
bounds(TimeWindow window)
static java.util.Comparator<TimeWindow>
compareByEndTime()
static java.util.Comparator<TimeWindow>
compareByStartAndEndTime()
static java.util.Comparator<TimeWindow>
compareByStartTime()
boolean
contains(long time)
boolean
contains(java.time.Instant instant)
static TimeWindow
empty()
boolean
equals(java.lang.Object o)
TimeWindow
expand(TimeWindow window)
static TimeWindow
fromStrings(java.lang.String startTime, java.lang.String endTime)
java.time.Instant
getEndTime()
long
getEndTimeNanos()
java.time.Instant
getStartTime()
long
getStartTimeNanos()
int
hashCode()
static TimeWindow
infinite()
TimeWindow
intersect(TimeWindow window)
boolean
intersects(TimeWindow window)
boolean
isEmpty()
boolean
isFinite()
boolean
isInfinite()
boolean
isLeftInfinite()
boolean
isRightInfinite()
TimeWindow
leftLimit(java.time.Instant limit)
TimeWindow
rightLimit(java.time.Instant limit)
java.lang.String
toString()
-
-
-
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()
-
infinite
public static TimeWindow infinite()
-
empty
public static TimeWindow empty()
-
between
public static TimeWindow between(long startNanos, long endNanos)
-
after
public static TimeWindow after(long startNanos)
-
before
public static TimeWindow before(long endNanos)
-
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()
-
expand
public TimeWindow expand(TimeWindow window)
-
intersect
public TimeWindow intersect(TimeWindow window)
-
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)
-
isEmpty
public boolean isEmpty()
-
isFinite
public boolean isFinite()
-
isInfinite
public boolean isInfinite()
-
isLeftInfinite
public boolean isLeftInfinite()
-
isRightInfinite
public boolean isRightInfinite()
-
getStartTime
public java.time.Instant getStartTime()
-
getEndTime
public java.time.Instant getEndTime()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-