kmongo / kotlin.collections / com.mongodb.client.MongoIterable / maxWithOrNull

maxWithOrNull

fun <T> MongoIterable<T>.maxWithOrNull(comparator: <ERROR CLASS><in T>): T? (source)

Returns the first element having the largest value according to the provided comparator or null if there are no elements.