collectDistinctMatching

inline fun <ID : Any, T> Field<ID, T>.collectDistinctMatching(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): Set<FieldEntry<ID, T>>

Collects the distinct field entries that satisfy the given predicate.

By default, the local entry is excluded from the result. It is included only if reductionType is it.unibo.collektive.stdlib.util.IncludingSelf.

Return

a set of matching field entries.

Parameters

reductionType

specifies whether to include the local entry (default is ExcludingSelf).

predicate

the filter applied to each field entry.