java.lang.Object
net.fortuna.ical4j.model.TemporalComparator
- All Implemented Interfaces:
Comparator<Temporal>
The purpose of this comparator is to compare two temporals regardless of type. Some temporal types are not
directly comparable, due to differences in supported units. For these cases we support hints to indicate how
they should be compared.
Compare
Temporal values based on a specified ChronoUnit.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTemporalComparator(TemporalUnit defaultComparisonUnit) TemporalComparator(TemporalUnit defaultComparisonUnit, ZoneId defaultZoneId) TemporalComparator(ZoneId defaultZoneId) -
Method Summary
Modifier and TypeMethodDescriptionintintintcompare(Instant o1, LocalDateTime o2) intcompare(Instant o1, OffsetDateTime o2) intintintcompare(LocalDate o1, LocalDateTime o2) intcompare(LocalDate o1, OffsetDateTime o2) intcompare(LocalDateTime o1, Instant o2) intcompare(LocalDateTime o1, LocalDate o2) intcompare(LocalDateTime o1, LocalDateTime o2) intcompare(LocalDateTime o1, OffsetDateTime o2) intcompare(OffsetDateTime o1, Instant o2) intcompare(OffsetDateTime o1, LocalDate o2) intcompare(OffsetDateTime o1, LocalDateTime o2) intcompare(OffsetDateTime o1, OffsetDateTime o2) intMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
TemporalComparator
public TemporalComparator() -
TemporalComparator
-
TemporalComparator
-
TemporalComparator
- Parameters:
defaultComparisonUnit- the fallback comparison unit if all other temporal comparisons are not applicable.
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Temporal>
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-
compare
-