Standard library documentation continued.
This commit is contained in:
@@ -16,6 +16,14 @@
|
||||
|
||||
package kotlin
|
||||
|
||||
/**
|
||||
* Classes which inherit from this trait have a defined total ordering between their instances.
|
||||
*/
|
||||
public trait Comparable<in T> {
|
||||
/**
|
||||
* Compares this object with the specified object for order. Returns zero if this object is equal
|
||||
* to the specified [other] object, a negative number if it's less than [other], or a positive number
|
||||
* if it's greater than [other].
|
||||
*/
|
||||
public fun compareTo(other: T): Int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user