FieldEntry

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

The entry of a Field.

Type Parameters

ID

device identifier type

T

the type of the value

Constructors

Link copied to clipboard
constructor(pair: Pair<ID, T>)
constructor(id: ID, value: T)

Creates a new FieldEntry with the given id and value.

constructor(entry: Map.Entry<ID, T>)

Creates a new FieldEntry with the given entry.

Properties

Link copied to clipboard
val id: ID

The device ID of this entry.

Link copied to clipboard
val pair: Pair<ID, T>

a pair version of this entry

Link copied to clipboard
val value: T

The value of this entry.

Functions

Link copied to clipboard
operator fun component1(): ID

The id.

Link copied to clipboard
operator fun component2(): T

The value.

Link copied to clipboard
fun <R> map(transform: (FieldEntry<ID, T>) -> R): FieldEntry<ID, R>

Returns a FieldEntry with the same id and a transformed value.

Link copied to clipboard
fun <R> mapValue(transform: (T) -> R): FieldEntry<ID, R>

Returns a FieldEntry with the same id and a transformed value.

Link copied to clipboard
open override fun toString(): String