Package-level declarations

Functions

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.all(crossinline predicate: (T) -> Boolean): Boolean

Check if all the elements in the field satisfy the predicate, ignoring the local value.

fun <ID : Any> Field<ID, Boolean>.all(base: Boolean, predicate: (Boolean) -> Boolean = { it }): Boolean

Check if all the Boolean elements in the field are true by default. If predicate is defined, it is applied to the elements. The base value is used as a first element to start the fold operation at which the predicate is applied.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.allWithSelf(crossinline predicate: (T) -> Boolean): Boolean

Check if all the elements in the field satisfy the predicate, including the local value.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.any(crossinline predicate: (T) -> Boolean): Boolean

Check if any of the elements in the field satisfy the predicate, ignoring the local value.

fun <ID : Any> Field<ID, Boolean>.any(base: Boolean, predicate: (Boolean) -> Boolean = { it }): Boolean

Check if any of the Boolean elements in the field are true by default. If predicate is defined, it is applied to the elements. The base value is used as a first element to start the fold operation at which the predicate is applied.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.anyWithSelf(crossinline predicate: (T) -> Boolean): Boolean

Check if any of the elements in the field satisfy the predicate, including the local value.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.count(crossinline predicate: (T) -> Boolean = { true }): Int

Count the number of elements in the field that satisfy the predicate, ignoring the local value.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.countWithSelf(crossinline predicate: (T) -> Boolean = { true }): Int

Count the number of elements in the field that satisfy the predicate, including the local value.

Link copied to clipboard
fun <ID : Any, T : Comparable<T>> Field<ID, T>.max(base: T): T

Get the maximum value of a field, excluding the local value, starting from base. To consider the local value, explicitly provide it as base.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.maxBy(base: T, crossinline selector: (T) -> R): T

Returns the element yielding the largest value of the given selector. In case multiple elements are maximal, there is no guarantee which one will be returned.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.maxWith(base: T, comparator: Comparator<T>): T

Returns the element yielding the largest value of the given comparator. In case multiple elements are maximal, there is no guarantee which one will be returned.

Link copied to clipboard
fun <ID : Any, T : Comparable<T>> Field<ID, T>.maxWithSelf(): T

Get the maximum value of a field, including the local value.

Link copied to clipboard
fun <ID : Any, T : Comparable<T>> Field<ID, T>.min(base: T): T

Get the minimum value of a field, excluding the local value, starting from base. To consider the local value, explicitly provide it as base.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.minBy(base: T, crossinline selector: (T) -> R): T

Returns the element yielding the smallest value of the given selector. In case multiple elements are minimal, there is no guarantee which one will be returned.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.minWith(base: T, comparator: Comparator<T>): T

Returns the element yielding the smallest value of the given comparator. In case multiple elements are minimal, there is no guarantee which one will be returned.

Link copied to clipboard
fun <ID : Any, T : Comparable<T>> Field<ID, T>.minWithSelf(): T

Get the minimum value of a field, including the local value.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.none(crossinline predicate: (T) -> Boolean): Boolean

Check if none of the elements in the field satisfy the predicate, ignoring the local value.

fun <ID : Any> Field<ID, Boolean>.none(base: Boolean, predicate: (Boolean) -> Boolean = { it }): Boolean

Check if none of the Boolean elements in the field are true by default. If predicate is defined, it is applied to the elements. The base value is used as a first element to start the fold operation at which the predicate is applied.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.noneWithSelf(crossinline predicate: (T) -> Boolean): Boolean

Check if none of the elements in the field satisfy the predicate, including the local value.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.replaceMatching(replaceWith: T, crossinline predicate: (T) -> Boolean): Field<ID, T>

Returns a new field containing replaceWith for each element that satisfies the predicate.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.replaceMatchingWithId(replaceWith: T, crossinline predicate: (ID, T) -> Boolean): Field<ID, T>

Returns a new field containing replaceWith for each element that satisfies the predicate.