Package-level declarations

Functions

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.all(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): Boolean

Returns true if all elements in the field satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any> Field<ID, *>.allIDs(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): Boolean

Returns true if all IDs in the field satisfy the given predicate.

Link copied to clipboard
fun <ID : Any> Field<ID, Boolean>.allValues(reductionType: ReductionType = ExcludingSelf): Boolean

Returns true if all Boolean values in the field are true.

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

Returns true if all values in the field satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.any(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): Boolean

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

Link copied to clipboard
inline fun <ID : Any> Field<ID, *>.anyID(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): Boolean

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

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

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

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.

Link copied to clipboard
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.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectDistinctMatchingIDs(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): Set<FieldEntry<ID, T>>

Collects the distinct field entries whose ID satisfies the given predicate.

Link copied to clipboard
inline fun <ID : Any, T, R> Field<ID, T>.collectDistinctMatchingMapped(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>, crossinline transform: (FieldEntry<ID, T>) -> R): Set<R>

Collects the field entries that satisfy the given predicate, transforms them using transform, and returns the result as a distinct Set.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectDistinctMatchingValues(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): Set<FieldEntry<ID, T>>

Collects the distinct field entries whose value satisfies the given predicate.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.collectDistinctValues(reductionType: ReductionType = ExcludingSelf): Set<T>

Collects all distinct field values.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectDistinctValuesMatchingIDs(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): Set<T>

Collects the distinct values of entries whose IDs satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectDistinctValuesMatchingValues(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): Set<T>

Collects the distinct values of entries whose values satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectIDsMatching(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): Set<ID>

Collects the IDs of entries that satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectIDsMatchingValues(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): Set<ID>

Collects the IDs of entries whose values satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any, T, R, C : MutableCollection<R>> Field<ID, T>.collectInto(accumulator: C, reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>, crossinline transform: (FieldEntry<ID, T>) -> R): C

Collects the field entries that satisfy the given predicate, transforms them using transform, and stores the results in the provided accumulator.

inline fun <ID : Any, T, R, C : MutableCollection<R>> Field<ID, T>.collectInto(reductionType: ReductionType = ExcludingSelf, crossinline produceAccumulator: (Int) -> C, crossinline predicate: Predicate<FieldEntry<ID, T>>, crossinline transform: (FieldEntry<ID, T>) -> R): C

Collects the field entries that satisfy the given predicate, transforms them using transform, and stores the results in a new Collection produced by produceAccumulator.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectMatching(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): List<FieldEntry<ID, T>>

Collects all entries that satisfy the given predicate into a list.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectMatchingIDs(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): List<FieldEntry<ID, T>>

Collects all entries whose IDs satisfy the given predicate into a list.

Link copied to clipboard
inline fun <ID : Any, T, R, C : MutableCollection<R>> Field<ID, T>.collectMatchingMapped(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>, crossinline transform: (FieldEntry<ID, T>) -> R): List<R>

Collects the field entries that satisfy the given predicate, transforms them using transform, and returns the result as a List.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectMatchingValues(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): List<FieldEntry<ID, T>>

Collects all entries whose values satisfy the given predicate into a list.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectValuesMatching(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): List<T>

Collects the values of entries that satisfy the given predicate into a list.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.collectValuesMatchingIDs(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): List<T>

Collects the values of entries whose IDs satisfy the given predicate into a list.

Link copied to clipboard
fun <T> Field<*, T>.containsValue(value: T): Boolean

Checks whether the given value is present in the field, including the local value. . This function returns true if value is equal to the local value or is contained in the values of the neighboring entries.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.countMatching(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): Int

Counts the number of field entries that satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any> Field<ID, *>.countMatchingIDs(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): Int

Counts the number of field IDs that satisfy the given predicate.

Link copied to clipboard
inline fun <T> Field<*, T>.countMatchingValues(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<T>): Int

Counts the number of field values that satisfy the given predicate.

Link copied to clipboard
inline fun <ID : Any, T, R> Field<ID, T>.fold(initial: R, crossinline accumulator: Accumulator<R, FieldEntry<ID, T>>): R

Accumulates a result starting from initial, by applying accumulator to each field entry (excluding the local one).

Link copied to clipboard
inline fun <ID : Any, R> Field<ID, *>.foldIDs(initial: R, crossinline accumulator: Accumulator<R, ID>): R

Accumulates a result starting from initial, by applying accumulator to each ID in the field (excluding the local one).

Link copied to clipboard
inline fun <T, R> Field<*, T>.foldValues(initial: R, crossinline accumulator: Accumulator<R, T>): R

Accumulates a result starting from initial, by applying accumulator to each value in the field (excluding the local one).

Link copied to clipboard
fun <ID : Any, T : Comparable<T>> Field<ID, T>.max(reductionType: ReductionType = ExcludingSelf): FieldEntry<ID, T>?

Returns the entry with the maximum value in the field.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.maxBy(reductionType: ReductionType = ExcludingSelf, crossinline selector: (FieldEntry<ID, T>) -> R): FieldEntry<ID, T>?

Returns the entry that yields the largest value according to the given selector.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.maxIDBy(reductionType: ReductionType = ExcludingSelf, crossinline selector: (FieldEntry<ID, T>) -> R): ID?

Returns the ID of the entry that yields the largest value according to the given selector.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.maxIDWith(reductionType: ReductionType = ExcludingSelf, comparator: Comparator<FieldEntry<ID, T>>): ID?

Returns the ID of the entry that yields the largest value according to the given comparator.

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

Returns the maximum value in the field, excluding the local value.

fun <ID : Any, T : Comparable<T>> Field<ID, T>.maxValue(base: T): T

Returns the maximum between base and the maximum value found in the field.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.maxValueBy(reductionType: ReductionType = ExcludingSelf, crossinline selector: (FieldEntry<ID, T>) -> R): T?

Returns the value of the entry that yields the largest value according to the given selector.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.maxValueWith(reductionType: ReductionType = ExcludingSelf, comparator: Comparator<FieldEntry<ID, T>>): T?

Returns the value of the entry that yields the largest value according to the given comparator.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.maxWith(reductionType: ReductionType = ExcludingSelf, comparator: Comparator<FieldEntry<ID, T>>): FieldEntry<ID, T>?

Returns the entry that yields the largest value according to the given comparator.

Link copied to clipboard
fun <ID : Any, T : Comparable<T>> Field<ID, T>.min(reductionType: ReductionType = ExcludingSelf): FieldEntry<ID, T>?

Returns the entry with the minimum value in the field.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.minBy(reductionType: ReductionType = ExcludingSelf, crossinline selector: (FieldEntry<ID, T>) -> R): FieldEntry<ID, T>?

Returns the entry that yields the smallest value according to the given selector.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.minIDBy(reductionType: ReductionType = ExcludingSelf, crossinline selector: (FieldEntry<ID, T>) -> R): ID?

Returns the ID of the entry that yields the smallest value according to the given selector.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.minIDWith(reductionType: ReductionType = ExcludingSelf, comparator: Comparator<FieldEntry<ID, T>>): ID?

Returns the ID of the entry that yields the smallest value according to the given comparator.

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

Returns the minimum value in the field, excluding the local value.

fun <ID : Any, T : Comparable<T>> Field<ID, T>.minValue(base: T): T

Returns the minimum between base and the minimum value found in the field.

Link copied to clipboard
inline fun <ID : Any, T, R : Comparable<R>> Field<ID, T>.minValueBy(reductionType: ReductionType = ExcludingSelf, crossinline selector: (FieldEntry<ID, T>) -> R): T?

Returns the value of the entry that yields the smallest value according to the given selector.

Link copied to clipboard
fun <ID : Any, T> Field<ID, T>.minValueWith(reductionType: ReductionType = ExcludingSelf, comparator: Comparator<FieldEntry<ID, T>>): T?

Returns the value of the entry that yields the smallest value according to the given comparator.

Link copied to clipboard
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.

Link copied to clipboard
inline fun <ID : Any> Field<ID, *>.noID(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<ID>): Boolean

Returns true if no ID in the field satisfies the given predicate.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.none(reductionType: ReductionType = ExcludingSelf, crossinline predicate: Predicate<FieldEntry<ID, T>>): Boolean

Returns true if no element in the field satisfies the given predicate.

Link copied to clipboard
fun <ID : Any> Field<ID, Boolean>.noValue(reductionType: ReductionType = ExcludingSelf): Boolean

Returns true if no Boolean values in the field are true.

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

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

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.reduce(crossinline reducer: Reducer<FieldEntry<ID, T>>): FieldEntry<ID, T>?

Reduces the field entries to a single value using the given reducer function, excluding the local element.

Link copied to clipboard
inline fun <ID : Any> Field<ID, *>.reduceIDs(crossinline reducer: Reducer<ID>): ID?

Reduces the field IDs to a single value using the given reducer function, excluding the local element.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.reduceValues(crossinline reducer: Reducer<T>): T?

Reduces the field values to a single value using the given reducer function, excluding the local element.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.replaceMatching(replacement: T, crossinline predicate: Predicate<FieldEntry<ID, T>>): Field<ID, T>

Returns a new field where each entry matching the given predicate is replaced with replacement.

Link copied to clipboard
inline fun <ID : Any, T> Field<ID, T>.replaceMatchingValues(replacement: T, crossinline predicate: Predicate<T>): Field<ID, T>

Returns a new field where each value matching the given predicate is replaced with replacement.