anyValue

fun <ID : Any> Field<ID, Boolean>.anyValue(reductionType: ReductionType = ExcludingSelf): Boolean

Returns true if at least one Boolean value in the field is true.

This overload assumes the identity predicate (i.e., it checks whether any value is true). The local value is included in the check if reductionType is it.unibo.collektive.stdlib.util.IncludingSelf (the default is ExcludingSelf).

Return

true if any applicable value is true, false otherwise.

Parameters

reductionType

controls whether the local value is included in the check.


inline fun <T> Field<*, T>.anyValue(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): Boolean

Returns true if any value in the field satisfies the given predicate.

The local value is included in the check if reductionType is it.unibo.collektive.stdlib.util.IncludingSelf (the default is ExcludingSelf).

Return

true if at least one matching value exists, false otherwise.

Parameters

reductionType

controls whether the local value is included in the check.

predicate

the condition to test for each value.