OffsetTime.compareTo

Compares this {@code OffsetTime} to another time. !(p) The comparison is based first on the UTC equivalent instant, then on the local time. It is "consistent with equals", as defined by {@link Comparable}. !(p) For example, the following is the comparator order: !(ol) !(li){@code 10:30+01:00}</li> !(li){@code 11:00+01:00}</li> !(li){@code 12:00+02:00}</li> !(li){@code 11:30+01:00}</li> !(li){@code 12:00+01:00}</li> !(li){@code 12:30+01:00}</li> </ol> Values #2 and #3 represent the same instant on the time-line. When two values represent the same instant, the local time is compared to distinguish them. This step is needed to make the ordering consistent with {@code equals()}. !(p) To compare the underlying local time of two {@code TemporalAccessor} instances, use {@link ChronoField#NANO_OF_DAY} as a comparator.

@param other the other time to compare to, not null @return the comparator value, negative if less, positive if greater

class OffsetTime
int
compareTo

Meta