min With
fun <ID : Any, T> Field<ID, T>.minWith(reductionType: ReductionType = ExcludingSelf, comparator: Comparator<FieldEntry<ID, T>>): FieldEntry<ID, T>?
Returns the entry that yields the smallest value according to the given comparator.
By default, the local entry is excluded from the comparison. It is included only if reductionType is IncludingSelf.
If multiple entries are considered equal under the comparator, one of them is returned arbitrarily. If the field contains no applicable entries, the result is null.
Return
the entry with the lowest value by comparator, or null if none.
Parameters
reduction Type
specifies whether to include the local entry in the comparison (default is ExcludingSelf).
comparator
a comparator that defines the ordering of entries.