Share via


Collectors.MinBy(IComparator) Method

Definition

Returns a Collector that produces the minimal element according to a given Comparator, described as an Optional<T>.

[Android.Runtime.Register("minBy", "(Ljava/util/Comparator;)Ljava/util/stream/Collector;", "", ApiSince=24)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Streams.ICollector? MinBy (Java.Util.IComparator? comparator);
[<Android.Runtime.Register("minBy", "(Ljava/util/Comparator;)Ljava/util/stream/Collector;", "", ApiSince=24)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member MinBy : Java.Util.IComparator -> Java.Util.Streams.ICollector

Parameters

comparator
IComparator

a Comparator for comparing elements

Returns

a Collector that produces the minimal value

Attributes

Remarks

Returns a Collector that produces the minimal element according to a given Comparator, described as an Optional<T>.

Java documentation for java.util.stream.Collectors.minBy(java.util.Comparator<? super T>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to