Package-level declarations

Types

Link copied to clipboard
sealed interface Collapse<out E>

A collapsing view over a collection of size elements that can be accessed as a list, set, or sequence.

Link copied to clipboard
interface CollapseAll<out E> : Collapse<E>

A Collapse that include the local element in addition to peers.

Link copied to clipboard
interface CollapseNeighbors<out E> : Collapse<E>

A Collapse that represents only the peers (excluding the local element).

Link copied to clipboard
sealed interface Field<ID : Any, out T>

A Field represents the local view of distributed values across a network of nodes.

Link copied to clipboard
value class FieldEntry<ID : Any, out T>(val pair: Pair<ID, T>)

The entry of a Field.

Properties

Link copied to clipboard

Returns a collapse containing only the IDs from this CollapseAll.

Returns a collapse containing only the IDs from this CollapseNeighbors.

Link copied to clipboard

Returns a collapse containing only the values from this CollapseAll.

Returns a collapse containing only the values from this CollapseNeighbors.

Functions

Link copied to clipboard
operator fun <T> Collapse<T>.contains(element: T): Boolean

Checks if the given element is present in this collapse.

Link copied to clipboard

Converts a Pair to a FieldEntry.

Converts a Map.Entry to a FieldEntry.

Link copied to clipboard
fun <ID : Any, T> Collapse<FieldEntry<ID, T>>.toMap(): Map<ID, T>

Converts this collapse of field entries into a map from entry IDs to their values.

fun <ID : Any, T> Sequence<FieldEntry<ID, T>>.toMap(): Map<ID, T>

Converts a Sequence of FieldEntry to a Map.