Duration.CompareTo(Duration) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares this duration to the specified Duration.
[Android.Runtime.Register("compareTo", "(Ljava/time/Duration;)I", "", ApiSince=26)]
public int CompareTo(Java.Time.Duration? otherDuration);
[<Android.Runtime.Register("compareTo", "(Ljava/time/Duration;)I", "", ApiSince=26)>]
member this.CompareTo : Java.Time.Duration -> int
Parameters
- otherDuration
- Duration
the other duration to compare to, not null
Returns
the comparator value, that is less than zero if this duration is less than otherDuration, zero if they are equal, greater than zero if this duration is greater than otherDuration
- Attributes
Remarks
Compares this duration to the specified Duration. The comparison is based on the total length of the durations. It is "consistent with equals", as defined by Comparable.
Java reference for java.time.Duration.compareTo.