Interface Temporal<C>
- Type Parameters:
C
- generic temporal type for pure temporal comparison purposes
- All Known Subinterfaces:
CalendarDate
- All Known Implementing Classes:
AnnualDate
,BadiCalendar
,CalendarVariant
,Calendrical
,ChineseCalendar
,CopticCalendar
,EastAsianCalendar
,EthiopianCalendar
,EthiopianTime
,FrenchRepublicanCalendar
,HebrewCalendar
,HebrewTime
,HijriCalendar
,HinduCalendar
,HistoricCalendar
,IndianCalendar
,JapaneseCalendar
,JucheCalendar
,JulianCalendar
,KoreanCalendar
,MinguoCalendar
,Moment
,PersianCalendar
,PlainDate
,PlainTime
,PlainTimestamp
,ThaiSolarCalendar
,VietnameseCalendar
Represents an object which can be sorted on a time axis in a temporal-only way.
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Queries if this object is after given object on a timeline.default boolean
isAfterAll(C... temporals)
Queries if this object is after all given objects on a timeline.default boolean
isAfterOrEqual(C temporal)
Queries if this object is after or simultaneous to given parameter.boolean
Queries if this object is before given object on a timeline.default boolean
isBeforeAll(C... temporals)
Queries if this object is before all given objects on a timeline.default boolean
isBeforeOrEqual(C temporal)
Queries if this object is before or simultaneous to given parameter.boolean
isSimultaneous(C temporal)
Queries if this object and given object have the same position on the time axis.
-
Method Details
-
isAfter
Queries if this object is after given object on a timeline.
- Parameters:
temporal
- object this instance is compared to- Returns:
true
if this instance is temporally aftertemporal
elsefalse
-
isBefore
Queries if this object is before given object on a timeline.
- Parameters:
temporal
- object this instance is compared to- Returns:
true
if this instance is temporally beforetemporal
elsefalse
-
isSimultaneous
Queries if this object and given object have the same position on the time axis.
Is equivalent to
!isAfter(temporal) && !isBefore(temporal)
. This method differs from theObject
-methodequals()
such that first the comparison type must be a temporal one and second that only temporal-only state will be considered.- Parameters:
temporal
- object this instance is compared to- Returns:
true
if this instance is temporally equal totemporal
elsefalse
-
isAfterOrEqual
Queries if this object is after or simultaneous to given parameter.
- Parameters:
temporal
- object this instance is compared to- Returns:
true
if this instance is temporally after or equal totemporal
elsefalse
- Since:
- 5.0
-
isBeforeOrEqual
Queries if this object is before or simultaneous to given parameter.
- Parameters:
temporal
- object this instance is compared to- Returns:
true
if this instance is temporally before or equal totemporal
elsefalse
- Since:
- 5.0
-
isAfterAll
Queries if this object is after all given objects on a timeline.
Note: This method should be considered as final and not be overridden.
- Parameters:
temporals
- array of objects this instance is compared to- Returns:
true
if this instance is temporally after every object intemporals
elsefalse
-
isBeforeAll
Queries if this object is before all given objects on a timeline.
Note: This method should be considered as final and not be overridden.
- Parameters:
temporals
- array of objects this instance is compared to- Returns:
true
if this instance is temporally before every object intemporals
elsefalse
-