Temporal values based on a specified ChronoUnit.
| Modifier and Type | Field and Description |
|---|---|
| private final TemporalUnit | |
| private final ZoneId | |
| public static final TemporalComparator |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | TemporalComparator(TemporalUnit
the fallback comparison unit if all other temporal comparisons are not applicable. defaultComparisonUnit, ZoneId defaultZoneId)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(Temporal
the first object to be compared. o1, Temporal the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(Instant
the first object to be compared. o1, Instant the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(OffsetDateTime
the first object to be compared. o1, OffsetDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDateTime
the first object to be compared. o1, LocalDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDate
the first object to be compared. o1, LocalDate the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(Instant
the first object to be compared. o1, LocalDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDateTime
the first object to be compared. o1, Instant the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(Instant
the first object to be compared. o1, OffsetDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(OffsetDateTime
the first object to be compared. o1, Instant the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(OffsetDateTime
the first object to be compared. o1, LocalDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDateTime
the first object to be compared. o1, OffsetDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(Instant
the first object to be compared. o1, LocalDate the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDate
the first object to be compared. o1, Instant the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(OffsetDateTime
the first object to be compared. o1, LocalDate the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDate
the first object to be compared. o1, OffsetDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDateTime
the first object to be compared. o1, LocalDate the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| public int | compare(LocalDate
the first object to be compared. o1, LocalDateTime the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| defaultComparisonUnit | back to summary |
|---|---|
| private final TemporalUnit defaultComparisonUnit | |
| defaultZoneId | back to summary |
|---|---|
| private final ZoneId defaultZoneId | |
| INSTANCE | back to summary |
|---|---|
| public static final TemporalComparator INSTANCE | |
| TemporalComparator | back to summary |
|---|---|
| public TemporalComparator() | |
| TemporalComparator | back to summary |
|---|---|
| public TemporalComparator(TemporalUnit defaultComparisonUnit) | |
| TemporalComparator | back to summary |
|---|---|
| public TemporalComparator(ZoneId defaultZoneId) | |
| TemporalComparator | back to summary |
|---|---|
public TemporalComparator(TemporalUnit defaultComparisonUnit, ZoneId defaultZoneId)
| |
| compare | back to summary |
|---|---|
| public int compare(Temporal o1, Temporal o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compare | back to summary |
|---|---|
| public int compare(Instant o1, Instant o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compare | back to summary |
|---|---|
| public int compare(OffsetDateTime o1, OffsetDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDateTime o1, LocalDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDate o1, LocalDate o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compare | back to summary |
|---|---|
| public int compare(Instant o1, LocalDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDateTime o1, Instant o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(Instant o1, OffsetDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(OffsetDateTime o1, Instant o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(OffsetDateTime o1, LocalDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDateTime o1, OffsetDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(Instant o1, LocalDate o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compare | back to summary |
|---|---|
| public int compare(LocalDate o1, Instant o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compare | back to summary |
|---|---|
| public int compare(OffsetDateTime o1, LocalDate o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDate o1, OffsetDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDateTime o1, LocalDate o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| compare | back to summary |
|---|---|
| public int compare(LocalDate o1, LocalDateTime o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |