compare

fun compare(item1: KGObject, item2: KGObject): Ordering

See also