maxValue

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

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

If the field contains only the local entry, the result is null.

Return

the highest value in the field, or null if no neighbors exist.


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.

The base value is always considered in the comparison. The field-based maximum excludes the local value.

Return

the greater of base and the maximum field value, or base if no neighbors exist.

Parameters

base

the reference value to compare against the maximum field value.