Package-level declarations

Types

Link copied to clipboard
@Serializable(with = DefaultKoneGrowableMutableListSerializer::class)
interface KoneGrowableMutableList<Element> : KoneMutableList<Element>

Represents a KoneMutableList which inner structure has a capacity that can be increased.

Link copied to clipboard
@Serializable(with = DefaultKoneGrowableMutableNoddedListSerializer::class)
interface KoneGrowableMutableNoddedList<Element> : KoneMutableNoddedList<Element> , KoneGrowableMutableList<Element>

Represents a nodded version of KoneGrowableMutableList. See KoneNoddedList for more.

Link copied to clipboard
@Serializable(with = DefaultKoneListSerializer::class)
interface KoneList<out Element> : KoneLinearIterable<Element>

Represents a finite collection of elements with some order on them.

Link copied to clipboard

A builder for constructing KoneList instances using a builder DSL.

Link copied to clipboard

Represents iterator over KoneList with iteration order coincident with the list elements order. See KoneLinearIterator for more.

Link copied to clipboard
interface KoneListNode<out Element>

Represents a node in the inner structure of a KoneNoddedList. See KoneNoddedList and KoneList for more.

Link copied to clipboard
@Serializable(with = DefaultKoneMutableListSerializer::class)
interface KoneMutableList<Element> : KoneSettableList<Element> , KoneMutableLinearIterable<Element>

Represents a finite collection of elements with some order on them with possibility to add, replace, and replace element at the provided index.

Link copied to clipboard

Represents iterator over KoneMutableList with iteration order coincident with the list elements order. See KoneMutableLinearIterator for more.

Link copied to clipboard

Represents a node in the inner structure of a KoneMutableNoddedList. See KoneMutableNoddedList and KoneMutableList for more.

Link copied to clipboard
@Serializable(with = DefaultKoneMutableNoddedListSerializer::class)
interface KoneMutableNoddedList<Element> : KoneSettableNoddedList<Element> , KoneMutableList<Element>

Represents a nodded version of KoneMutableList. See KoneNoddedList for more.

Link copied to clipboard
@Serializable(with = DefaultKoneNoddedListSerializer::class)
interface KoneNoddedList<out Element> : KoneList<Element>

Represents a nodded version of KoneList.

Link copied to clipboard

A builder for constructing KoneNoddedList instances using a builder DSL.

Link copied to clipboard

Represents iterator over KoneNoddedList.

Link copied to clipboard
@Serializable(with = DefaultKoneSettableListSerializer::class)
interface KoneSettableList<Element> : KoneList<Element> , KoneSettableLinearIterable<Element>

Represents a finite collection of elements with some order on them with possibility to replace element at the provided index.

Link copied to clipboard

Represents iterator over KoneSettableList with iteration order coincident with the list elements order. See KoneSettableLinearIterator for more.

Link copied to clipboard

Represents a node in the inner structure of a KoneSettableNoddedList. See KoneSettableNoddedList and KoneSettableList for more.

Link copied to clipboard
@Serializable(with = DefaultKoneSettableNoddedListSerializer::class)
interface KoneSettableNoddedList<Element> : KoneNoddedList<Element> , KoneSettableList<Element>

Represents a nodded version of KoneSettableList. See KoneNoddedList for more.

Properties

Link copied to clipboard

Returns the list's indices range.

Link copied to clipboard

Returns the last index of elements in the list.

Functions

Link copied to clipboard

Adds provided elements at the end of the ordered collection.

Link copied to clipboard

Adds provided elements before element with index index.

Link copied to clipboard
inline fun <Element> KoneMutableList<Element>.addSeveral(number: UInt, builder: (index: UInt) -> Element)
Link copied to clipboard
inline fun <Element> KoneMutableList<Element>.addSeveralAt(index: UInt, number: UInt, builder: (index: UInt) -> Element)
Link copied to clipboard

Builds a KoneList using the provided builderAction DSL.

Builds a KoneNoddedList using the provided builderAction DSL.

inline fun <Element> KoneList.Companion.build(initialCapacity: UInt, builderAction: KoneListBuilder<Element>.() -> Unit): KoneList<Element>

Builds a KoneList with the given initialCapacity using the provided builderAction DSL.

inline fun <Element> KoneNoddedList.Companion.build(initialCapacity: UInt, builderAction: KoneNoddedListBuilder<Element>.() -> Unit): KoneNoddedList<Element>

Builds a KoneNoddedList with the given initialCapacity using the provided builderAction DSL.

Link copied to clipboard

Returns empty list.

Returns empty nodded list.

Returns empty settable list.

Returns empty settable nodded list.

Link copied to clipboard

Returns a list of provided size filled with the given element.

Returns a mutable list of provided size filled with the given element.

Returns a mutable nodded list of provided size filled with the given element.

Returns a nodded list of provided size filled with the given element.

Returns a settable list of provided size filled with the given element.

Returns a settable nodded list of provided size filled with the given element.

Link copied to clipboard
inline fun <Element> KoneList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneList<Element>

Returns a list of provided size of elements produced by the initializer.

inline fun <Element> KoneList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneList<Element>

Returns a list of elements over the provided indices range produced by the initializer.

inline fun <Element> KoneMutableList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneMutableList<Element>

Returns a mutable list of provided size of elements produced by the initializer.

inline fun <Element> KoneMutableList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneMutableList<Element>

Returns a mutable list of elements over the provided indices range produced by the initializer.

Returns a mutable nodded list of provided size of elements produced by the initializer.

Returns a mutable nodded list of elements over the provided indices range produced by the initializer.

inline fun <Element> KoneNoddedList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneNoddedList<Element>

Returns a nodded list of provided size of elements produced by the initializer.

inline fun <Element> KoneNoddedList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneNoddedList<Element>

Returns a nodded list of elements over the provided indices range produced by the initializer.

inline fun <Element> KoneSettableList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneSettableList<Element>

Returns a settable list of provided size of elements produced by the initializer.

inline fun <Element> KoneSettableList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneSettableList<Element>

Returns a settable list of elements over the provided indices range produced by the initializer.

Returns a settable nodded list of provided size of elements produced by the initializer.

Returns a settable nodded list of elements over the provided indices range produced by the initializer.

Link copied to clipboard

Returns the element at the provided index wrapped in Some or None if index is out of bounds.

Link copied to clipboard
fun <Element> KoneList<Element>.getOrElse(index: UInt, block: () -> Element): Element

Returns the element at the provided index or the result of block if index is out of bounds.

Link copied to clipboard

Returns the element at the provided index or null if index is out of bounds.

Link copied to clipboard
inline fun <Element> KoneList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneList<Element>

Returns a list of provided size where each next element is computed from the previous one.

inline fun <Element> KoneList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneList<Element>

Returns a list of elements over the provided indices range where each next element is computed from the previous one.

inline fun <Element> KoneMutableList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableList<Element>

Returns a mutable list of provided size where each next element is computed from the previous one.

inline fun <Element> KoneMutableList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableList<Element>

Returns a mutable list of elements over the provided indices range where each next element is computed from the previous one.

inline fun <Element> KoneMutableNoddedList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableNoddedList<Element>

Returns a mutable nodded list of provided size where each next element is computed from the previous one.

inline fun <Element> KoneMutableNoddedList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableNoddedList<Element>

Returns a mutable nodded list of elements over the provided indices range where each next element is computed from the previous one.

inline fun <Element> KoneNoddedList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneNoddedList<Element>

Returns a nodded list of provided size where each next element is computed from the previous one.

inline fun <Element> KoneNoddedList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneNoddedList<Element>

Returns a nodded list of elements over the provided indices range where each next element is computed from the previous one.

inline fun <Element> KoneSettableList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableList<Element>

Returns a settable list of provided size where each next element is computed from the previous one.

inline fun <Element> KoneSettableList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableList<Element>

Returns a settable list of elements over the provided indices range where each next element is computed from the previous one.

inline fun <Element> KoneSettableNoddedList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableNoddedList<Element>

Returns a settable nodded list of provided size where each next element is computed from the previous one.

inline fun <Element> KoneSettableNoddedList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableNoddedList<Element>

Returns a settable nodded list of elements over the provided indices range where each next element is computed from the previous one.

Link copied to clipboard

Returns an empty list.

Returns an empty mutable list.

Returns an empty mutable nodded list.

Returns an empty nodded list.

Returns a singleton list containing the given element.

Returns a list containing the given elements.

Returns a mutable list containing the given elements.

Returns a mutable nodded list containing the given elements.

Returns a singleton nodded list containing the given element.

Returns a nodded list containing the given elements.

Returns a settable list containing the given elements.

Returns a settable nodded list containing the given elements.

Link copied to clipboard

Finds first element equal to the provided element with respect to context Equality and removes it.

Link copied to clipboard
inline fun <Element> KoneMutableList<Element>.removeAllThat(predicate: (element: Element) -> Boolean)
Link copied to clipboard
inline fun <Element> KoneMutableList<Element>.removeAllThatIndexed(predicate: (index: UInt, element: Element) -> Boolean)
Link copied to clipboard
inline fun <Element> KoneMutableList<Element>.retainAllThat(predicate: (element: Element) -> Boolean)

Iterates over the collection and retains only the elements matching the predicate.

Link copied to clipboard
inline fun <Element> KoneMutableList<Element>.retainAllThatIndexed(predicate: (index: UInt, element: Element) -> Boolean)

Iterates over the collection and retains only the elements matching the predicate.

Link copied to clipboard

Converts this iterable to a KoneList.

Converts this iterator to a KoneList.

Converts this sequence to a KoneList.