compareTo method

  1. @override
int compareTo(
  1. Fixed other
)
override

Two Fixed instances are the same if they have the same minorUnits and the same scale.

Implementation

@override
int compareTo(Fixed other) {
  if (minorUnits == other.minorUnits) {
    return scale.compareTo(other.scale);
  } else {
    return minorUnits.compareTo(other.minorUnits);
  }
}