compareTo

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

Orders by the fully-qualified name. Nested types are ordered immediately after their enclosing type. For example, the following types are ordered by this method:

com.example.Robot
com.example.Robot.Motor
com.example.RoboticVacuum

Comparison is consistent with equals()