compareTo

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

Compares this energy with the specified energy for order.

Returns zero if this energy is equal to the specified energy, a negative number if it's less than the specified energy, or a positive number if it's greater than the specified energy.

Return

a negative integer, zero, or a positive integer as this energy is less than, equal to, or greater than the specified energy.

Parameters

other

the energy to be compared.