NullableElementIterableExtension<T> extension
Extension methods for nullable Iterable<T?> to perform common operations such as finding the element that yields the highest value based on a selector.
- on
-
- Iterable<
T?>
- Iterable<
Methods
-
maxBy<
K extends Comparable> (K selector(T element)) → T? -
Available on Iterable<
Returns the element that yields the highest value based on the givenT?> , provided by the NullableElementIterableExtension extensionselector
. If the iterable is empty or all elements arenull
, it returnsnull
.