Package io.deephaven.time.calendar
Class TimeRange<T extends Comparable<T> & Temporal>
java.lang.Object
io.deephaven.time.calendar.TimeRange<T>
- Type Parameters:
T
- time type
A range of time.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines if the specified time is within the time range.duration()
Duration of the range.end()
End of the range.boolean
int
hashCode()
boolean
Is the end time inclusive?long
nanos()
Length of the range in nanoseconds.start()
Start of the range.Converts a time range in local time to a specific date and time zone.toString()
-
Method Details
-
start
Start of the range.- Returns:
- start of the range
-
end
End of the range.- Returns:
- End of the range
-
isInclusiveEnd
public boolean isInclusiveEnd()Is the end time inclusive?- Returns:
- is the end time inclusive?
-
nanos
public long nanos()Length of the range in nanoseconds.- Returns:
- length of the range in nanoseconds
-
duration
Duration of the range.- Returns:
- duration of the range
-
contains
Determines if the specified time is within the time range.- Parameters:
time
- time.- Returns:
- true if the time is in this range; otherwise, false.
-
equals
-
hashCode
public int hashCode() -
toString
-
toInstant
Converts a time range in local time to a specific date and time zone.- Parameters:
p
- time range in local timedate
- date for the new time rangetimeZone
- time zone for the new time range- Returns:
- new time range in the specified date and time zone
-