compareTo method

  1. @override
int compareTo(
  1. T other

Compares this Measurement to other, returning zero if the values are equal.

Returns a negative integer if this Measurement is less than other, or a positive integer if it is greater.

A negative Measurement is always considered shorter than a positive one.

It is always the case that measurement1.compareTo(measurement2) < 0 iff (someMeasurement + measurement1).compareTo(someMeasurement + measurement2) < 0.


int compareTo(T other) => _baseValue.compareTo(other._baseValue);