compareTo method

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

Compares this to other.

other has to be in same currency, ArgumentError will be thrown otherwise.

Implementation

@override
int compareTo(Money other) {
  _preconditionThatCurrencyTheSameFor(other);

  return amount.compareTo(other.amount);
}