Language

LocalTime.CompareTo(LocalTime) Method

Definition

Compares this time to another time.

[Android.Runtime.Register("compareTo", "(Ljava/time/LocalTime;)I", "", ApiSince=26)]
public int CompareTo(Java.Time.LocalTime? other);
[<Android.Runtime.Register("compareTo", "(Ljava/time/LocalTime;)I", "", ApiSince=26)>]
member this.CompareTo : Java.Time.LocalTime -> int

Parameters

other
LocalTime

the other time to compare to, not null

Returns

the comparator value, that is less than zero if this is before other, zero if they are equal, or greater than zero if this is after other

Attributes

Remarks

Compares this time to another time. The comparison is based on the time-line position of the local times within a day. It is "consistent with equals", as defined by Comparable.

Java reference for java.time.LocalTime.compareTo.

Applies to