LazyMappedList

class LazyMappedList<T, U>(val originalList: List<T>, val transform: (T, Int) -> U)

List implementation that applies the expensive transform function only when the element is accessed and caches calculated values. Size is very cheap as it doesn't call transform. Used internally by net.corda.core.transactions.TraversableTransaction.

Constructors

Link copied to clipboard
constructor(originalList: List<T>, transform: (T, Int) -> U)

Properties

Link copied to clipboard
Link copied to clipboard
open val size: Int
Link copied to clipboard
val transform: (T, Int) -> U

Functions

Link copied to clipboard
open fun get(index: Int): U