maxWith (original) (raw)

Returns the first element having the largest value according to the provided comparator.

Since Kotlin

1.7

Throws


Returns the first element having the largest value according to the provided comparator.

Since Kotlin

1.7

Throws

if the collection is empty.


Returns the first entry having the largest value according to the provided comparator.

Since Kotlin

1.7

Throws

Deprecated

Use maxWithOrNull instead.

Replace with

this.maxWithOrNull(comparator)

Since Kotlin

1.0


Deprecated

Use maxWithOrNull instead.

Replace with

this.maxWithOrNull(comparator)

Since Kotlin

1.3

Thanks for your feedback!