Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:core
  3. Duration
  4. compareTo method
compareTo
description

compareTo method

intcompareTo(
  1. Durationother
)
override

Compares thisDuration toother, returning zero if the values are equal.

Returns a negative integer if thisDuration is shorter thanother, or a positive integer if it is longer.

A negativeDuration is always considered shorter than a positive one.

It is always the case thatduration1.compareTo(duration2) < 0 iff(someDate + duration1).compareTo(someDate + duration2) < 0.

Implementation

int compareTo(Duration other) => _duration.compareTo(other._duration);
  1. Dart
  2. dart:core
  3. Duration
  4. compareTo method
Duration class

[8]ページ先頭

©2009-2025 Movatter.jp