KoneArraySettableList
Represents a usual (settable) array of elements of type Element.
Implementation details
This implementation just holds an array (of fixed size) and proxies all operations straight to KoneMutableArray. The only difference between it and KoneMutableArray is that the last one must have reified type parameter while the first one must not.
Time complexity of operations
| Operation | Worst case | Average |
|---|---|---|
| size | \(\Theta(1)\) | \(\Theta(1)\) |
| get | \(\Theta(1)\) | \(\Theta(1)\) |
| set | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator | \(\Theta(1)\) | \(\Theta(1)\) |
| iteratorFrom | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.hasNext | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.hasPrevious | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.getNext | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.getPrevious | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.moveNext | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.movePrevious | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.setNext | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.setPrevious | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.nextIndex | \(\Theta(1)\) | \(\Theta(1)\) |
| iterator.previousIndex | \(\Theta(1)\) | \(\Theta(1)\) |
Functions
Converts this KoneIterable to a KoneSequence by returning this iterable's iterators.
fun <Element> KoneIterable<Element>.containsAllFrom(elements: KoneIterable<Element>): Boolean
inline fun <E, R> KoneSettableList<E>.heapsortByDescending(selector: (E) -> R)
Checks if the iterable is not empty.
Initiates an iterator over the collection's elements with pointer before the first element.
Initiates an iterator over the collection's elements with pointer between elements with indices index - 1 and index correspondingly.
Converts this iterable to a KoneList.
Converts this iterable to a KoneMutableList.
Converts this iterable to a KoneMutableNoddedList.
Converts this iterable to a KoneNoddedList.
Converts this iterable to a KoneSettableList.
Converts this iterable to a KoneSettableNoddedList.