LongIndexed

An Indexed value whose index is a Long, comparable to other LongIndexed values by index. This is the type produced by Sequence.longIndexed, the 64-bit counterpart of IntIndexed, useful whenever the position of a value may exceed Int.MAX_VALUE (e.g. it.unibo.tuprolog.collections.rete.custom.clause.IndexedClause in the :theory module indexes clauses by insertion order using a Long, since a knowledge base may grow without a practical Int-sized bound).

Type Parameters

T

is the type of the indexed value

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val index: Long

The index/position associated with value.

Link copied to clipboard
abstract val value: T

The indexed value.

Functions

Link copied to clipboard
open operator override fun compareTo(other: LongIndexed<T>): Int

Compares two LongIndexed values by their index, ignoring value.

Link copied to clipboard
open operator fun component1(): Long

Destructuring component corresponding to index.

Link copied to clipboard
open operator fun component2(): T

Destructuring component corresponding to value.

Link copied to clipboard
abstract override fun <R> map(mapper: (T) -> R): LongIndexed<R>

Returns a new LongIndexed with the same index, and value transformed via mapper.