compareTo

open operator override fun compareTo(other: Consumption): Int

Compares this object with another consumption object of the same consumption type.

Return

Returns zero if this object represents the same quantity as the other object, a negative number if it's less than other, or a positive number if it's greater than other.

Parameters

other

Another consumption object of the same consumption type.

Throws

if the consumption types do not match.