diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/-double-deque.html b/docs/-kubit/kubit.collections.deque/-double-deque/-double-deque.html new file mode 100644 index 0000000..3b42802 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/-double-deque.html @@ -0,0 +1,130 @@ + + + + + DoubleDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

DoubleDeque

+
+
constructor(initialCapacity: Int)(source)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/add-first.html b/docs/-kubit/kubit.collections.deque/-double-deque/add-first.html new file mode 100644 index 0000000..5189d02 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/add-first.html @@ -0,0 +1,130 @@ + + + + + addFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addFirst

+
+
fun addFirst(value: Double)(source)

Adds value to the front (head) of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/add-last.html b/docs/-kubit/kubit.collections.deque/-double-deque/add-last.html new file mode 100644 index 0000000..7a26648 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/add-last.html @@ -0,0 +1,130 @@ + + + + + addLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addLast

+
+
fun addLast(value: Double)(source)

Adds value to the end of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/add.html b/docs/-kubit/kubit.collections.deque/-double-deque/add.html new file mode 100644 index 0000000..b975075 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/add.html @@ -0,0 +1,130 @@ + + + + + add + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

add

+
+
fun add(value: Double)(source)

Adds value to the end of this deque. Alias for addLast.


fun add(index: Int, value: Double)(source)

Inserts value at index. Elements may be shifted to make room for the new element.

Throws

if index is out of bounds 0, size.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/clear.html b/docs/-kubit/kubit.collections.deque/-double-deque/clear.html new file mode 100644 index 0000000..ded2541 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/clear.html @@ -0,0 +1,130 @@ + + + + + clear + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

clear

+
+
fun clear()(source)

Removes all elements from this deque. Capacity is preserved.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/contains.html b/docs/-kubit/kubit.collections.deque/-double-deque/contains.html new file mode 100644 index 0000000..1d56aeb --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/contains.html @@ -0,0 +1,130 @@ + + + + + contains + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

contains

+
+
operator fun contains(value: Double): Boolean(source)

Returns true if value exists in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/dequeue.html b/docs/-kubit/kubit.collections.deque/-double-deque/dequeue.html new file mode 100644 index 0000000..21f946d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/dequeue.html @@ -0,0 +1,130 @@ + + + + + dequeue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dequeue

+
+

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/enqueue.html b/docs/-kubit/kubit.collections.deque/-double-deque/enqueue.html new file mode 100644 index 0000000..63771d6 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/enqueue.html @@ -0,0 +1,130 @@ + + + + + enqueue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

enqueue

+
+
fun enqueue(value: Double)(source)

Enqueues value at the end (queue-style). Alias for addLast.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/first-or-null.html b/docs/-kubit/kubit.collections.deque/-double-deque/first-or-null.html new file mode 100644 index 0000000..dbcc962 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/first-or-null.html @@ -0,0 +1,130 @@ + + + + + firstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

firstOrNull

+
+

Returns the first element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/first.html b/docs/-kubit/kubit.collections.deque/-double-deque/first.html new file mode 100644 index 0000000..d15ae5c --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/first.html @@ -0,0 +1,130 @@ + + + + + first + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

first

+
+

Returns the first element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/for-each-indexed.html b/docs/-kubit/kubit.collections.deque/-double-deque/for-each-indexed.html new file mode 100644 index 0000000..750523d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/for-each-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachIndexed

+
+
inline fun forEachIndexed(action: (index: Int, value: Double) -> Unit)(source)

Iterates elements from first to last, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/for-each-reversed-indexed.html b/docs/-kubit/kubit.collections.deque/-double-deque/for-each-reversed-indexed.html new file mode 100644 index 0000000..2fdf5d7 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/for-each-reversed-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachReversedIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversedIndexed

+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Double) -> Unit)(source)

Iterates elements from last to first, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/for-each-reversed.html b/docs/-kubit/kubit.collections.deque/-double-deque/for-each-reversed.html new file mode 100644 index 0000000..9f05a11 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/for-each-reversed.html @@ -0,0 +1,130 @@ + + + + + forEachReversed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversed

+
+
inline fun forEachReversed(action: (Double) -> Unit)(source)

Iterates elements from last to first, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/for-each.html b/docs/-kubit/kubit.collections.deque/-double-deque/for-each.html new file mode 100644 index 0000000..29b340e --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/for-each.html @@ -0,0 +1,130 @@ + + + + + forEach + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEach

+
+
inline fun forEach(action: (Double) -> Unit)(source)

Iterates elements from first to last, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/get.html b/docs/-kubit/kubit.collections.deque/-double-deque/get.html new file mode 100644 index 0000000..dc4b7e1 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/get.html @@ -0,0 +1,130 @@ + + + + + get + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

get

+
+
operator fun get(index: Int): Double(source)

Returns the element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/index-of.html b/docs/-kubit/kubit.collections.deque/-double-deque/index-of.html new file mode 100644 index 0000000..3e3a96a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/index-of.html @@ -0,0 +1,130 @@ + + + + + indexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

indexOf

+
+
fun indexOf(value: Double): Int(source)

Returns the index of the first occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/index.html b/docs/-kubit/kubit.collections.deque/-double-deque/index.html new file mode 100644 index 0000000..3d56b33 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/index.html @@ -0,0 +1,642 @@ + + + + + DoubleDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

DoubleDeque

+
class DoubleDeque(initialCapacity: Int)(source)

DoubleDeque is a double-ended queue for Double values backed by a circular buffer.

  • Amortized O(1) insertion/removal at both ends.

  • Indexed access, insertion and removal are supported (may shift elements internally).

  • Not thread-safe: synchronize externally if multiple threads mutate concurrently.

Throws

if initialCapacity is negative.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(initialCapacity: Int)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

The last valid element index, or -1 when the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
val size: Int

The number of elements in this deque.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun add(value: Double)

Adds value to the end of this deque. Alias for addLast.

fun add(index: Int, value: Double)

Inserts value at index. Elements may be shifted to make room for the new element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addFirst(value: Double)

Adds value to the front (head) of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addLast(value: Double)

Adds value to the end of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live List view backed by this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live MutableList view backed by this deque. Structural changes are reflected both ways.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun clear()

Removes all elements from this deque. Capacity is preserved.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun contains(value: Double): Boolean

Returns true if value exists in this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun enqueue(value: Double)

Enqueues value at the end (queue-style). Alias for addLast.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun first(): Double

Returns the first element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the first element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEach(action: (Double) -> Unit)

Iterates elements from first to last, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachIndexed(action: (index: Int, value: Double) -> Unit)

Iterates elements from first to last, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversed(action: (Double) -> Unit)

Iterates elements from last to first, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Double) -> Unit)

Iterates elements from last to first, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun get(index: Int): Double

Returns the element at index.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun indexOf(value: Double): Int

Returns the index of the first occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isEmpty(): Boolean

Returns true if this deque contains no elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isNotEmpty(): Boolean

Returns true if this deque contains one or more elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun last(): Double

Returns the last element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun lastIndexOf(value: Double): Int

Returns the index of the last occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the last element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun pop(): Double

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun push(value: Double)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun removeAt(index: Int): Double

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun set(index: Int, value: Double): Double

Replaces the element at index with value.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/is-empty.html b/docs/-kubit/kubit.collections.deque/-double-deque/is-empty.html new file mode 100644 index 0000000..f7b4eca --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/is-empty.html @@ -0,0 +1,130 @@ + + + + + isEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isEmpty

+
+
inline fun isEmpty(): Boolean(source)

Returns true if this deque contains no elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/is-not-empty.html b/docs/-kubit/kubit.collections.deque/-double-deque/is-not-empty.html new file mode 100644 index 0000000..d6f3545 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/is-not-empty.html @@ -0,0 +1,130 @@ + + + + + isNotEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isNotEmpty

+
+
inline fun isNotEmpty(): Boolean(source)

Returns true if this deque contains one or more elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/last-index-of.html b/docs/-kubit/kubit.collections.deque/-double-deque/last-index-of.html new file mode 100644 index 0000000..f54018b --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/last-index-of.html @@ -0,0 +1,130 @@ + + + + + lastIndexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndexOf

+
+

Returns the index of the last occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/last-index.html b/docs/-kubit/kubit.collections.deque/-double-deque/last-index.html new file mode 100644 index 0000000..598e757 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/last-index.html @@ -0,0 +1,130 @@ + + + + + lastIndex + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndex

+
+

The last valid element index, or -1 when the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/last-or-null.html b/docs/-kubit/kubit.collections.deque/-double-deque/last-or-null.html new file mode 100644 index 0000000..1cd2a67 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/last-or-null.html @@ -0,0 +1,130 @@ + + + + + lastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastOrNull

+
+

Returns the last element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/last.html b/docs/-kubit/kubit.collections.deque/-double-deque/last.html new file mode 100644 index 0000000..a8855c7 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/last.html @@ -0,0 +1,130 @@ + + + + + last + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

last

+
+

Returns the last element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/pop.html b/docs/-kubit/kubit.collections.deque/-double-deque/pop.html new file mode 100644 index 0000000..e268133 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/pop.html @@ -0,0 +1,130 @@ + + + + + pop + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

pop

+
+
fun pop(): Double(source)

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/push.html b/docs/-kubit/kubit.collections.deque/-double-deque/push.html new file mode 100644 index 0000000..41426ad --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/push.html @@ -0,0 +1,130 @@ + + + + + push + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

push

+
+
fun push(value: Double)(source)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/remove-at.html b/docs/-kubit/kubit.collections.deque/-double-deque/remove-at.html new file mode 100644 index 0000000..5e9552a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/remove-at.html @@ -0,0 +1,130 @@ + + + + + removeAt + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeAt

+
+
fun removeAt(index: Int): Double(source)

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/remove-first-or-null.html b/docs/-kubit/kubit.collections.deque/-double-deque/remove-first-or-null.html new file mode 100644 index 0000000..041e2b8 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/remove-first-or-null.html @@ -0,0 +1,130 @@ + + + + + removeFirstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirstOrNull

+
+

Removes and returns the first element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/remove-first.html b/docs/-kubit/kubit.collections.deque/-double-deque/remove-first.html new file mode 100644 index 0000000..51f6980 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/remove-first.html @@ -0,0 +1,130 @@ + + + + + removeFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirst

+
+

Removes and returns the first element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/remove-last-or-null.html b/docs/-kubit/kubit.collections.deque/-double-deque/remove-last-or-null.html new file mode 100644 index 0000000..67a1f38 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/remove-last-or-null.html @@ -0,0 +1,130 @@ + + + + + removeLastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLastOrNull

+
+

Removes and returns the last element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/remove-last.html b/docs/-kubit/kubit.collections.deque/-double-deque/remove-last.html new file mode 100644 index 0000000..fc34c07 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/remove-last.html @@ -0,0 +1,130 @@ + + + + + removeLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLast

+
+

Removes and returns the last element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/set.html b/docs/-kubit/kubit.collections.deque/-double-deque/set.html new file mode 100644 index 0000000..dec9d1c --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/set.html @@ -0,0 +1,130 @@ + + + + + set + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

set

+
+
operator fun set(index: Int, value: Double): Double(source)

Replaces the element at index with value.

Return

the previous element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-double-deque/size.html b/docs/-kubit/kubit.collections.deque/-double-deque/size.html new file mode 100644 index 0000000..1c895d9 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-double-deque/size.html @@ -0,0 +1,130 @@ + + + + + size + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

size

+
+

The number of elements in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/-float-deque.html b/docs/-kubit/kubit.collections.deque/-float-deque/-float-deque.html new file mode 100644 index 0000000..287eff0 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/-float-deque.html @@ -0,0 +1,130 @@ + + + + + FloatDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FloatDeque

+
+
constructor(initialCapacity: Int)(source)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/add-first.html b/docs/-kubit/kubit.collections.deque/-float-deque/add-first.html new file mode 100644 index 0000000..34c7758 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/add-first.html @@ -0,0 +1,130 @@ + + + + + addFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addFirst

+
+
fun addFirst(value: Float)(source)

Adds value to the front (head) of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/add-last.html b/docs/-kubit/kubit.collections.deque/-float-deque/add-last.html new file mode 100644 index 0000000..8c36505 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/add-last.html @@ -0,0 +1,130 @@ + + + + + addLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addLast

+
+
fun addLast(value: Float)(source)

Adds value to the end of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/add.html b/docs/-kubit/kubit.collections.deque/-float-deque/add.html new file mode 100644 index 0000000..2f3cc38 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/add.html @@ -0,0 +1,130 @@ + + + + + add + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

add

+
+
fun add(value: Float)(source)

Adds value to the end of this deque. Alias for addLast.


fun add(index: Int, value: Float)(source)

Inserts value at index. Elements may be shifted to make room for the new element.

Throws

if index is out of bounds 0, size.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/clear.html b/docs/-kubit/kubit.collections.deque/-float-deque/clear.html new file mode 100644 index 0000000..0c90754 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/clear.html @@ -0,0 +1,130 @@ + + + + + clear + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

clear

+
+
fun clear()(source)

Removes all elements from this deque. Capacity is preserved.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/contains.html b/docs/-kubit/kubit.collections.deque/-float-deque/contains.html new file mode 100644 index 0000000..fd4e77d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/contains.html @@ -0,0 +1,130 @@ + + + + + contains + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

contains

+
+
operator fun contains(value: Float): Boolean(source)

Returns true if value exists in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/dequeue.html b/docs/-kubit/kubit.collections.deque/-float-deque/dequeue.html new file mode 100644 index 0000000..810e99b --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/dequeue.html @@ -0,0 +1,130 @@ + + + + + dequeue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dequeue

+
+

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/enqueue.html b/docs/-kubit/kubit.collections.deque/-float-deque/enqueue.html new file mode 100644 index 0000000..c094dda --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/enqueue.html @@ -0,0 +1,130 @@ + + + + + enqueue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

enqueue

+
+
fun enqueue(value: Float)(source)

Enqueues value at the end (queue-style). Alias for addLast.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/first-or-null.html b/docs/-kubit/kubit.collections.deque/-float-deque/first-or-null.html new file mode 100644 index 0000000..249faeb --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/first-or-null.html @@ -0,0 +1,130 @@ + + + + + firstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

firstOrNull

+
+

Returns the first element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/first.html b/docs/-kubit/kubit.collections.deque/-float-deque/first.html new file mode 100644 index 0000000..daf79ff --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/first.html @@ -0,0 +1,130 @@ + + + + + first + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

first

+
+

Returns the first element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/for-each-indexed.html b/docs/-kubit/kubit.collections.deque/-float-deque/for-each-indexed.html new file mode 100644 index 0000000..1db9c96 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/for-each-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachIndexed

+
+
inline fun forEachIndexed(action: (index: Int, value: Float) -> Unit)(source)

Iterates elements from first to last, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/for-each-reversed-indexed.html b/docs/-kubit/kubit.collections.deque/-float-deque/for-each-reversed-indexed.html new file mode 100644 index 0000000..009367f --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/for-each-reversed-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachReversedIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversedIndexed

+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Float) -> Unit)(source)

Iterates elements from last to first, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/for-each-reversed.html b/docs/-kubit/kubit.collections.deque/-float-deque/for-each-reversed.html new file mode 100644 index 0000000..6b52c2d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/for-each-reversed.html @@ -0,0 +1,130 @@ + + + + + forEachReversed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversed

+
+
inline fun forEachReversed(action: (Float) -> Unit)(source)

Iterates elements from last to first, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/for-each.html b/docs/-kubit/kubit.collections.deque/-float-deque/for-each.html new file mode 100644 index 0000000..4a4fc9f --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/for-each.html @@ -0,0 +1,130 @@ + + + + + forEach + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEach

+
+
inline fun forEach(action: (Float) -> Unit)(source)

Iterates elements from first to last, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/get.html b/docs/-kubit/kubit.collections.deque/-float-deque/get.html new file mode 100644 index 0000000..638fd14 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/get.html @@ -0,0 +1,130 @@ + + + + + get + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

get

+
+
operator fun get(index: Int): Float(source)

Returns the element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/index-of.html b/docs/-kubit/kubit.collections.deque/-float-deque/index-of.html new file mode 100644 index 0000000..abc2e64 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/index-of.html @@ -0,0 +1,130 @@ + + + + + indexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

indexOf

+
+
fun indexOf(value: Float): Int(source)

Returns the index of the first occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/index.html b/docs/-kubit/kubit.collections.deque/-float-deque/index.html new file mode 100644 index 0000000..b53699e --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/index.html @@ -0,0 +1,642 @@ + + + + + FloatDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FloatDeque

+
class FloatDeque(initialCapacity: Int)(source)

FloatDeque is a double-ended queue for Float values backed by a circular buffer.

  • Amortized O(1) insertion/removal at both ends.

  • Indexed access, insertion and removal are supported (may shift elements internally).

  • Not thread-safe: synchronize externally if multiple threads mutate concurrently.

Throws

if initialCapacity is negative.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(initialCapacity: Int)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

The last valid element index, or -1 when the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
val size: Int

The number of elements in this deque.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun add(value: Float)

Adds value to the end of this deque. Alias for addLast.

fun add(index: Int, value: Float)

Inserts value at index. Elements may be shifted to make room for the new element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addFirst(value: Float)

Adds value to the front (head) of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addLast(value: Float)

Adds value to the end of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live List view backed by this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live MutableList view backed by this deque. Structural changes are reflected both ways.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun clear()

Removes all elements from this deque. Capacity is preserved.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun contains(value: Float): Boolean

Returns true if value exists in this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun dequeue(): Float

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun enqueue(value: Float)

Enqueues value at the end (queue-style). Alias for addLast.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun first(): Float

Returns the first element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the first element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEach(action: (Float) -> Unit)

Iterates elements from first to last, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachIndexed(action: (index: Int, value: Float) -> Unit)

Iterates elements from first to last, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversed(action: (Float) -> Unit)

Iterates elements from last to first, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Float) -> Unit)

Iterates elements from last to first, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun get(index: Int): Float

Returns the element at index.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun indexOf(value: Float): Int

Returns the index of the first occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isEmpty(): Boolean

Returns true if this deque contains no elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isNotEmpty(): Boolean

Returns true if this deque contains one or more elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun last(): Float

Returns the last element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun lastIndexOf(value: Float): Int

Returns the index of the last occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the last element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun pop(): Float

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun push(value: Float)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun removeAt(index: Int): Float

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun set(index: Int, value: Float): Float

Replaces the element at index with value.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/is-empty.html b/docs/-kubit/kubit.collections.deque/-float-deque/is-empty.html new file mode 100644 index 0000000..3319216 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/is-empty.html @@ -0,0 +1,130 @@ + + + + + isEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isEmpty

+
+
inline fun isEmpty(): Boolean(source)

Returns true if this deque contains no elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/is-not-empty.html b/docs/-kubit/kubit.collections.deque/-float-deque/is-not-empty.html new file mode 100644 index 0000000..610f350 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/is-not-empty.html @@ -0,0 +1,130 @@ + + + + + isNotEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isNotEmpty

+
+
inline fun isNotEmpty(): Boolean(source)

Returns true if this deque contains one or more elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/last-index-of.html b/docs/-kubit/kubit.collections.deque/-float-deque/last-index-of.html new file mode 100644 index 0000000..078039a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/last-index-of.html @@ -0,0 +1,130 @@ + + + + + lastIndexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndexOf

+
+
fun lastIndexOf(value: Float): Int(source)

Returns the index of the last occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/last-index.html b/docs/-kubit/kubit.collections.deque/-float-deque/last-index.html new file mode 100644 index 0000000..9ba2128 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/last-index.html @@ -0,0 +1,130 @@ + + + + + lastIndex + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndex

+
+

The last valid element index, or -1 when the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/last-or-null.html b/docs/-kubit/kubit.collections.deque/-float-deque/last-or-null.html new file mode 100644 index 0000000..4eaeda8 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/last-or-null.html @@ -0,0 +1,130 @@ + + + + + lastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastOrNull

+
+

Returns the last element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/last.html b/docs/-kubit/kubit.collections.deque/-float-deque/last.html new file mode 100644 index 0000000..e7bd7b6 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/last.html @@ -0,0 +1,130 @@ + + + + + last + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

last

+
+
fun last(): Float(source)

Returns the last element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/pop.html b/docs/-kubit/kubit.collections.deque/-float-deque/pop.html new file mode 100644 index 0000000..2e6f17a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/pop.html @@ -0,0 +1,130 @@ + + + + + pop + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

pop

+
+
fun pop(): Float(source)

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/push.html b/docs/-kubit/kubit.collections.deque/-float-deque/push.html new file mode 100644 index 0000000..8f93e31 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/push.html @@ -0,0 +1,130 @@ + + + + + push + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

push

+
+
fun push(value: Float)(source)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/remove-at.html b/docs/-kubit/kubit.collections.deque/-float-deque/remove-at.html new file mode 100644 index 0000000..72643fb --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/remove-at.html @@ -0,0 +1,130 @@ + + + + + removeAt + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeAt

+
+
fun removeAt(index: Int): Float(source)

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/remove-first-or-null.html b/docs/-kubit/kubit.collections.deque/-float-deque/remove-first-or-null.html new file mode 100644 index 0000000..e875628 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/remove-first-or-null.html @@ -0,0 +1,130 @@ + + + + + removeFirstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirstOrNull

+
+

Removes and returns the first element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/remove-first.html b/docs/-kubit/kubit.collections.deque/-float-deque/remove-first.html new file mode 100644 index 0000000..c6030c7 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/remove-first.html @@ -0,0 +1,130 @@ + + + + + removeFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirst

+
+

Removes and returns the first element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/remove-last-or-null.html b/docs/-kubit/kubit.collections.deque/-float-deque/remove-last-or-null.html new file mode 100644 index 0000000..92b4416 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/remove-last-or-null.html @@ -0,0 +1,130 @@ + + + + + removeLastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLastOrNull

+
+

Removes and returns the last element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/remove-last.html b/docs/-kubit/kubit.collections.deque/-float-deque/remove-last.html new file mode 100644 index 0000000..787122d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/remove-last.html @@ -0,0 +1,130 @@ + + + + + removeLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLast

+
+

Removes and returns the last element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/set.html b/docs/-kubit/kubit.collections.deque/-float-deque/set.html new file mode 100644 index 0000000..853cee5 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/set.html @@ -0,0 +1,130 @@ + + + + + set + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

set

+
+
operator fun set(index: Int, value: Float): Float(source)

Replaces the element at index with value.

Return

the previous element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-float-deque/size.html b/docs/-kubit/kubit.collections.deque/-float-deque/size.html new file mode 100644 index 0000000..e1b2aeb --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-float-deque/size.html @@ -0,0 +1,130 @@ + + + + + size + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

size

+
+

The number of elements in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/-int-deque.html b/docs/-kubit/kubit.collections.deque/-int-deque/-int-deque.html new file mode 100644 index 0000000..4755b64 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/-int-deque.html @@ -0,0 +1,130 @@ + + + + + IntDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

IntDeque

+
+
constructor(initialCapacity: Int)(source)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/add-first.html b/docs/-kubit/kubit.collections.deque/-int-deque/add-first.html new file mode 100644 index 0000000..3bc2a51 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/add-first.html @@ -0,0 +1,130 @@ + + + + + addFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addFirst

+
+
fun addFirst(value: Int)(source)

Adds value to the front (head) of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/add-last.html b/docs/-kubit/kubit.collections.deque/-int-deque/add-last.html new file mode 100644 index 0000000..2035bd0 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/add-last.html @@ -0,0 +1,130 @@ + + + + + addLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addLast

+
+
fun addLast(value: Int)(source)

Adds value to the end of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/add.html b/docs/-kubit/kubit.collections.deque/-int-deque/add.html new file mode 100644 index 0000000..4280e03 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/add.html @@ -0,0 +1,130 @@ + + + + + add + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

add

+
+
fun add(value: Int)(source)

Adds value to the end of this deque. Alias for addLast.


fun add(index: Int, value: Int)(source)

Inserts value at index. Elements may be shifted to make room for the new element.

Throws

if index is out of bounds 0, size.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/clear.html b/docs/-kubit/kubit.collections.deque/-int-deque/clear.html new file mode 100644 index 0000000..5c7d245 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/clear.html @@ -0,0 +1,130 @@ + + + + + clear + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

clear

+
+
fun clear()(source)

Removes all elements from this deque. Capacity is preserved.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/contains.html b/docs/-kubit/kubit.collections.deque/-int-deque/contains.html new file mode 100644 index 0000000..87db17e --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/contains.html @@ -0,0 +1,130 @@ + + + + + contains + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

contains

+
+
operator fun contains(value: Int): Boolean(source)

Returns true if value exists in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/dequeue.html b/docs/-kubit/kubit.collections.deque/-int-deque/dequeue.html new file mode 100644 index 0000000..3caf931 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/dequeue.html @@ -0,0 +1,130 @@ + + + + + dequeue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dequeue

+
+

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/enqueue.html b/docs/-kubit/kubit.collections.deque/-int-deque/enqueue.html new file mode 100644 index 0000000..bf1bb28 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/enqueue.html @@ -0,0 +1,130 @@ + + + + + enqueue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

enqueue

+
+
fun enqueue(value: Int)(source)

Enqueues value at the end (queue-style). Alias for addLast.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/first-or-null.html b/docs/-kubit/kubit.collections.deque/-int-deque/first-or-null.html new file mode 100644 index 0000000..3daeae3 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/first-or-null.html @@ -0,0 +1,130 @@ + + + + + firstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

firstOrNull

+
+

Returns the first element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/first.html b/docs/-kubit/kubit.collections.deque/-int-deque/first.html new file mode 100644 index 0000000..103f930 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/first.html @@ -0,0 +1,130 @@ + + + + + first + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

first

+
+
fun first(): Int(source)

Returns the first element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/for-each-indexed.html b/docs/-kubit/kubit.collections.deque/-int-deque/for-each-indexed.html new file mode 100644 index 0000000..a29aab9 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/for-each-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachIndexed

+
+
inline fun forEachIndexed(action: (index: Int, value: Int) -> Unit)(source)

Iterates elements from first to last, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/for-each-reversed-indexed.html b/docs/-kubit/kubit.collections.deque/-int-deque/for-each-reversed-indexed.html new file mode 100644 index 0000000..8411958 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/for-each-reversed-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachReversedIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversedIndexed

+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Int) -> Unit)(source)

Iterates elements from last to first, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/for-each-reversed.html b/docs/-kubit/kubit.collections.deque/-int-deque/for-each-reversed.html new file mode 100644 index 0000000..453ca7a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/for-each-reversed.html @@ -0,0 +1,130 @@ + + + + + forEachReversed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversed

+
+
inline fun forEachReversed(action: (Int) -> Unit)(source)

Iterates elements from last to first, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/for-each.html b/docs/-kubit/kubit.collections.deque/-int-deque/for-each.html new file mode 100644 index 0000000..638ce03 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/for-each.html @@ -0,0 +1,130 @@ + + + + + forEach + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEach

+
+
inline fun forEach(action: (Int) -> Unit)(source)

Iterates elements from first to last, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/get.html b/docs/-kubit/kubit.collections.deque/-int-deque/get.html new file mode 100644 index 0000000..e01d60a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/get.html @@ -0,0 +1,130 @@ + + + + + get + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

get

+
+
operator fun get(index: Int): Int(source)

Returns the element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/index-of.html b/docs/-kubit/kubit.collections.deque/-int-deque/index-of.html new file mode 100644 index 0000000..3b3be75 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/index-of.html @@ -0,0 +1,130 @@ + + + + + indexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

indexOf

+
+
fun indexOf(value: Int): Int(source)

Returns the index of the first occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/index.html b/docs/-kubit/kubit.collections.deque/-int-deque/index.html new file mode 100644 index 0000000..0b01c86 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/index.html @@ -0,0 +1,642 @@ + + + + + IntDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

IntDeque

+
class IntDeque(initialCapacity: Int)(source)

IntDeque is a double-ended queue for Int values backed by a circular buffer.

  • Amortized O(1) insertion/removal at both ends.

  • Indexed access, insertion and removal are supported (may shift elements internally).

  • Not thread-safe: synchronize externally if multiple threads mutate concurrently.

Throws

if initialCapacity is negative.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(initialCapacity: Int)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

The last valid element index, or -1 when the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
val size: Int

The number of elements in this deque.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun add(value: Int)

Adds value to the end of this deque. Alias for addLast.

fun add(index: Int, value: Int)

Inserts value at index. Elements may be shifted to make room for the new element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addFirst(value: Int)

Adds value to the front (head) of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addLast(value: Int)

Adds value to the end of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live List view backed by this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live MutableList view backed by this deque. Structural changes are reflected both ways.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun clear()

Removes all elements from this deque. Capacity is preserved.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun contains(value: Int): Boolean

Returns true if value exists in this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun dequeue(): Int

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun enqueue(value: Int)

Enqueues value at the end (queue-style). Alias for addLast.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun first(): Int

Returns the first element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the first element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEach(action: (Int) -> Unit)

Iterates elements from first to last, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachIndexed(action: (index: Int, value: Int) -> Unit)

Iterates elements from first to last, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversed(action: (Int) -> Unit)

Iterates elements from last to first, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Int) -> Unit)

Iterates elements from last to first, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun get(index: Int): Int

Returns the element at index.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun indexOf(value: Int): Int

Returns the index of the first occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isEmpty(): Boolean

Returns true if this deque contains no elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isNotEmpty(): Boolean

Returns true if this deque contains one or more elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun last(): Int

Returns the last element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun lastIndexOf(value: Int): Int

Returns the index of the last occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun lastOrNull(): Int?

Returns the last element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun pop(): Int

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun push(value: Int)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun removeAt(index: Int): Int

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun set(index: Int, value: Int): Int

Replaces the element at index with value.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/is-empty.html b/docs/-kubit/kubit.collections.deque/-int-deque/is-empty.html new file mode 100644 index 0000000..9c28391 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/is-empty.html @@ -0,0 +1,130 @@ + + + + + isEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isEmpty

+
+
inline fun isEmpty(): Boolean(source)

Returns true if this deque contains no elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/is-not-empty.html b/docs/-kubit/kubit.collections.deque/-int-deque/is-not-empty.html new file mode 100644 index 0000000..4d9a2d6 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/is-not-empty.html @@ -0,0 +1,130 @@ + + + + + isNotEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isNotEmpty

+
+
inline fun isNotEmpty(): Boolean(source)

Returns true if this deque contains one or more elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/last-index-of.html b/docs/-kubit/kubit.collections.deque/-int-deque/last-index-of.html new file mode 100644 index 0000000..8510e98 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/last-index-of.html @@ -0,0 +1,130 @@ + + + + + lastIndexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndexOf

+
+
fun lastIndexOf(value: Int): Int(source)

Returns the index of the last occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/last-index.html b/docs/-kubit/kubit.collections.deque/-int-deque/last-index.html new file mode 100644 index 0000000..cdb304f --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/last-index.html @@ -0,0 +1,130 @@ + + + + + lastIndex + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndex

+
+

The last valid element index, or -1 when the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/last-or-null.html b/docs/-kubit/kubit.collections.deque/-int-deque/last-or-null.html new file mode 100644 index 0000000..d760b02 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/last-or-null.html @@ -0,0 +1,130 @@ + + + + + lastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastOrNull

+
+

Returns the last element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/last.html b/docs/-kubit/kubit.collections.deque/-int-deque/last.html new file mode 100644 index 0000000..d3ea2c5 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/last.html @@ -0,0 +1,130 @@ + + + + + last + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

last

+
+
fun last(): Int(source)

Returns the last element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/pop.html b/docs/-kubit/kubit.collections.deque/-int-deque/pop.html new file mode 100644 index 0000000..d7b2b05 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/pop.html @@ -0,0 +1,130 @@ + + + + + pop + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

pop

+
+
fun pop(): Int(source)

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/push.html b/docs/-kubit/kubit.collections.deque/-int-deque/push.html new file mode 100644 index 0000000..f1c38c7 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/push.html @@ -0,0 +1,130 @@ + + + + + push + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

push

+
+
fun push(value: Int)(source)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/remove-at.html b/docs/-kubit/kubit.collections.deque/-int-deque/remove-at.html new file mode 100644 index 0000000..f4109b3 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/remove-at.html @@ -0,0 +1,130 @@ + + + + + removeAt + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeAt

+
+
fun removeAt(index: Int): Int(source)

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/remove-first-or-null.html b/docs/-kubit/kubit.collections.deque/-int-deque/remove-first-or-null.html new file mode 100644 index 0000000..a8bebe3 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/remove-first-or-null.html @@ -0,0 +1,130 @@ + + + + + removeFirstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirstOrNull

+
+

Removes and returns the first element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/remove-first.html b/docs/-kubit/kubit.collections.deque/-int-deque/remove-first.html new file mode 100644 index 0000000..fc572c9 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/remove-first.html @@ -0,0 +1,130 @@ + + + + + removeFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirst

+
+

Removes and returns the first element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/remove-last-or-null.html b/docs/-kubit/kubit.collections.deque/-int-deque/remove-last-or-null.html new file mode 100644 index 0000000..8b8d18c --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/remove-last-or-null.html @@ -0,0 +1,130 @@ + + + + + removeLastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLastOrNull

+
+

Removes and returns the last element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/remove-last.html b/docs/-kubit/kubit.collections.deque/-int-deque/remove-last.html new file mode 100644 index 0000000..d34e9af --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/remove-last.html @@ -0,0 +1,130 @@ + + + + + removeLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLast

+
+

Removes and returns the last element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/set.html b/docs/-kubit/kubit.collections.deque/-int-deque/set.html new file mode 100644 index 0000000..740c146 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/set.html @@ -0,0 +1,130 @@ + + + + + set + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

set

+
+
operator fun set(index: Int, value: Int): Int(source)

Replaces the element at index with value.

Return

the previous element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-int-deque/size.html b/docs/-kubit/kubit.collections.deque/-int-deque/size.html new file mode 100644 index 0000000..d0ab245 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-int-deque/size.html @@ -0,0 +1,130 @@ + + + + + size + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

size

+
+

The number of elements in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/-long-deque.html b/docs/-kubit/kubit.collections.deque/-long-deque/-long-deque.html new file mode 100644 index 0000000..fc441bd --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/-long-deque.html @@ -0,0 +1,130 @@ + + + + + LongDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

LongDeque

+
+
constructor(initialCapacity: Int)(source)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/add-first.html b/docs/-kubit/kubit.collections.deque/-long-deque/add-first.html new file mode 100644 index 0000000..b0e7f98 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/add-first.html @@ -0,0 +1,130 @@ + + + + + addFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addFirst

+
+
fun addFirst(value: Long)(source)

Adds value to the front (head) of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/add-last.html b/docs/-kubit/kubit.collections.deque/-long-deque/add-last.html new file mode 100644 index 0000000..41af9d4 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/add-last.html @@ -0,0 +1,130 @@ + + + + + addLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

addLast

+
+
fun addLast(value: Long)(source)

Adds value to the end of this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/add.html b/docs/-kubit/kubit.collections.deque/-long-deque/add.html new file mode 100644 index 0000000..27493f1 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/add.html @@ -0,0 +1,130 @@ + + + + + add + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

add

+
+
fun add(value: Long)(source)

Adds value to the end of this deque. Alias for addLast.


fun add(index: Int, value: Long)(source)

Inserts value at index. Elements may be shifted to make room for the new element.

Throws

if index is out of bounds 0, size.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/clear.html b/docs/-kubit/kubit.collections.deque/-long-deque/clear.html new file mode 100644 index 0000000..9e14271 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/clear.html @@ -0,0 +1,130 @@ + + + + + clear + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

clear

+
+
fun clear()(source)

Removes all elements from this deque. Capacity is preserved.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/contains.html b/docs/-kubit/kubit.collections.deque/-long-deque/contains.html new file mode 100644 index 0000000..774ebb4 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/contains.html @@ -0,0 +1,130 @@ + + + + + contains + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

contains

+
+
operator fun contains(value: Long): Boolean(source)

Returns true if value exists in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/dequeue.html b/docs/-kubit/kubit.collections.deque/-long-deque/dequeue.html new file mode 100644 index 0000000..f3bc5da --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/dequeue.html @@ -0,0 +1,130 @@ + + + + + dequeue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dequeue

+
+

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/enqueue.html b/docs/-kubit/kubit.collections.deque/-long-deque/enqueue.html new file mode 100644 index 0000000..fe2c256 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/enqueue.html @@ -0,0 +1,130 @@ + + + + + enqueue + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

enqueue

+
+
fun enqueue(value: Long)(source)

Enqueues value at the end (queue-style). Alias for addLast.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/first-or-null.html b/docs/-kubit/kubit.collections.deque/-long-deque/first-or-null.html new file mode 100644 index 0000000..f01594a --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/first-or-null.html @@ -0,0 +1,130 @@ + + + + + firstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

firstOrNull

+
+

Returns the first element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/first.html b/docs/-kubit/kubit.collections.deque/-long-deque/first.html new file mode 100644 index 0000000..44a00e0 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/first.html @@ -0,0 +1,130 @@ + + + + + first + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

first

+
+
fun first(): Long(source)

Returns the first element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/for-each-indexed.html b/docs/-kubit/kubit.collections.deque/-long-deque/for-each-indexed.html new file mode 100644 index 0000000..8cac08d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/for-each-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachIndexed

+
+
inline fun forEachIndexed(action: (index: Int, value: Long) -> Unit)(source)

Iterates elements from first to last, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/for-each-reversed-indexed.html b/docs/-kubit/kubit.collections.deque/-long-deque/for-each-reversed-indexed.html new file mode 100644 index 0000000..79a7531 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/for-each-reversed-indexed.html @@ -0,0 +1,130 @@ + + + + + forEachReversedIndexed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversedIndexed

+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Long) -> Unit)(source)

Iterates elements from last to first, passing the logical index and value to action.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/for-each-reversed.html b/docs/-kubit/kubit.collections.deque/-long-deque/for-each-reversed.html new file mode 100644 index 0000000..e1839a4 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/for-each-reversed.html @@ -0,0 +1,130 @@ + + + + + forEachReversed + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEachReversed

+
+
inline fun forEachReversed(action: (Long) -> Unit)(source)

Iterates elements from last to first, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/for-each.html b/docs/-kubit/kubit.collections.deque/-long-deque/for-each.html new file mode 100644 index 0000000..e88dc12 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/for-each.html @@ -0,0 +1,130 @@ + + + + + forEach + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

forEach

+
+
inline fun forEach(action: (Long) -> Unit)(source)

Iterates elements from first to last, invoking action for each element.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/get.html b/docs/-kubit/kubit.collections.deque/-long-deque/get.html new file mode 100644 index 0000000..81b966e --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/get.html @@ -0,0 +1,130 @@ + + + + + get + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

get

+
+
operator fun get(index: Int): Long(source)

Returns the element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/index-of.html b/docs/-kubit/kubit.collections.deque/-long-deque/index-of.html new file mode 100644 index 0000000..23fc292 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/index-of.html @@ -0,0 +1,130 @@ + + + + + indexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

indexOf

+
+
fun indexOf(value: Long): Int(source)

Returns the index of the first occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/index.html b/docs/-kubit/kubit.collections.deque/-long-deque/index.html new file mode 100644 index 0000000..24a6284 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/index.html @@ -0,0 +1,642 @@ + + + + + LongDeque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

LongDeque

+
class LongDeque(initialCapacity: Int)(source)

LongDeque is a double-ended queue for Long values backed by a circular buffer.

  • Amortized O(1) insertion/removal at both ends.

  • Indexed access, insertion and removal are supported (may shift elements internally).

  • Not thread-safe: synchronize externally if multiple threads mutate concurrently.

Throws

if initialCapacity is negative.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(initialCapacity: Int)

Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.

+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

The last valid element index, or -1 when the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
val size: Int

The number of elements in this deque.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun add(value: Long)

Adds value to the end of this deque. Alias for addLast.

fun add(index: Int, value: Long)

Inserts value at index. Elements may be shifted to make room for the new element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addFirst(value: Long)

Adds value to the front (head) of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun addLast(value: Long)

Adds value to the end of this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live List view backed by this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live MutableList view backed by this deque. Structural changes are reflected both ways.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun clear()

Removes all elements from this deque. Capacity is preserved.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun contains(value: Long): Boolean

Returns true if value exists in this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun dequeue(): Long

Dequeues and returns the front element (queue-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun enqueue(value: Long)

Enqueues value at the end (queue-style). Alias for addLast.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun first(): Long

Returns the first element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the first element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEach(action: (Long) -> Unit)

Iterates elements from first to last, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachIndexed(action: (index: Int, value: Long) -> Unit)

Iterates elements from first to last, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversed(action: (Long) -> Unit)

Iterates elements from last to first, invoking action for each element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun forEachReversedIndexed(action: (index: Int, value: Long) -> Unit)

Iterates elements from last to first, passing the logical index and value to action.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun get(index: Int): Long

Returns the element at index.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun indexOf(value: Long): Int

Returns the index of the first occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isEmpty(): Boolean

Returns true if this deque contains no elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
inline fun isNotEmpty(): Boolean

Returns true if this deque contains one or more elements.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun last(): Long

Returns the last element, or throws if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun lastIndexOf(value: Long): Int

Returns the index of the last occurrence of value, or -1 if not found.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the last element, or null if this deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun pop(): Long

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun push(value: Long)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun removeAt(index: Int): Long

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the first element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Removes and returns the last element, or null if the deque is empty.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
operator fun set(index: Int, value: Long): Long

Replaces the element at index with value.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/is-empty.html b/docs/-kubit/kubit.collections.deque/-long-deque/is-empty.html new file mode 100644 index 0000000..5643e4c --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/is-empty.html @@ -0,0 +1,130 @@ + + + + + isEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isEmpty

+
+
inline fun isEmpty(): Boolean(source)

Returns true if this deque contains no elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/is-not-empty.html b/docs/-kubit/kubit.collections.deque/-long-deque/is-not-empty.html new file mode 100644 index 0000000..2155c2f --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/is-not-empty.html @@ -0,0 +1,130 @@ + + + + + isNotEmpty + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isNotEmpty

+
+
inline fun isNotEmpty(): Boolean(source)

Returns true if this deque contains one or more elements.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/last-index-of.html b/docs/-kubit/kubit.collections.deque/-long-deque/last-index-of.html new file mode 100644 index 0000000..df6802d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/last-index-of.html @@ -0,0 +1,130 @@ + + + + + lastIndexOf + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndexOf

+
+
fun lastIndexOf(value: Long): Int(source)

Returns the index of the last occurrence of value, or -1 if not found.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/last-index.html b/docs/-kubit/kubit.collections.deque/-long-deque/last-index.html new file mode 100644 index 0000000..9329f2d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/last-index.html @@ -0,0 +1,130 @@ + + + + + lastIndex + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastIndex

+
+

The last valid element index, or -1 when the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/last-or-null.html b/docs/-kubit/kubit.collections.deque/-long-deque/last-or-null.html new file mode 100644 index 0000000..b0f14e1 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/last-or-null.html @@ -0,0 +1,130 @@ + + + + + lastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

lastOrNull

+
+

Returns the last element, or null if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/last.html b/docs/-kubit/kubit.collections.deque/-long-deque/last.html new file mode 100644 index 0000000..cc52423 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/last.html @@ -0,0 +1,130 @@ + + + + + last + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

last

+
+
fun last(): Long(source)

Returns the last element, or throws if this deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/pop.html b/docs/-kubit/kubit.collections.deque/-long-deque/pop.html new file mode 100644 index 0000000..d48aef4 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/pop.html @@ -0,0 +1,130 @@ + + + + + pop + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

pop

+
+
fun pop(): Long(source)

Pops and returns the front element (stack-style). Alias for removeFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/push.html b/docs/-kubit/kubit.collections.deque/-long-deque/push.html new file mode 100644 index 0000000..b8e7f6c --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/push.html @@ -0,0 +1,130 @@ + + + + + push + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

push

+
+
fun push(value: Long)(source)

Pushes value onto the front (stack-style). Alias for addFirst.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/remove-at.html b/docs/-kubit/kubit.collections.deque/-long-deque/remove-at.html new file mode 100644 index 0000000..bd14c2d --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/remove-at.html @@ -0,0 +1,130 @@ + + + + + removeAt + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeAt

+
+
fun removeAt(index: Int): Long(source)

Removes and returns the element at index. The internal storage may shift elements towards either end to fill the gap.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/remove-first-or-null.html b/docs/-kubit/kubit.collections.deque/-long-deque/remove-first-or-null.html new file mode 100644 index 0000000..9f601a5 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/remove-first-or-null.html @@ -0,0 +1,130 @@ + + + + + removeFirstOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirstOrNull

+
+

Removes and returns the first element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/remove-first.html b/docs/-kubit/kubit.collections.deque/-long-deque/remove-first.html new file mode 100644 index 0000000..c6adad4 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/remove-first.html @@ -0,0 +1,130 @@ + + + + + removeFirst + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeFirst

+
+

Removes and returns the first element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/remove-last-or-null.html b/docs/-kubit/kubit.collections.deque/-long-deque/remove-last-or-null.html new file mode 100644 index 0000000..688f619 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/remove-last-or-null.html @@ -0,0 +1,130 @@ + + + + + removeLastOrNull + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLastOrNull

+
+

Removes and returns the last element, or null if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/remove-last.html b/docs/-kubit/kubit.collections.deque/-long-deque/remove-last.html new file mode 100644 index 0000000..94cce20 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/remove-last.html @@ -0,0 +1,130 @@ + + + + + removeLast + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

removeLast

+
+

Removes and returns the last element.

Throws

if the deque is empty.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/set.html b/docs/-kubit/kubit.collections.deque/-long-deque/set.html new file mode 100644 index 0000000..f7ea756 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/set.html @@ -0,0 +1,130 @@ + + + + + set + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

set

+
+
operator fun set(index: Int, value: Long): Long(source)

Replaces the element at index with value.

Return

the previous element at index.

Throws

if index is out of bounds [0, size).

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/-long-deque/size.html b/docs/-kubit/kubit.collections.deque/-long-deque/size.html new file mode 100644 index 0000000..ad006c0 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/-long-deque/size.html @@ -0,0 +1,130 @@ + + + + + size + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

size

+
+

The number of elements in this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/as-list.html b/docs/-kubit/kubit.collections.deque/as-list.html new file mode 100644 index 0000000..8dd8a03 --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/as-list.html @@ -0,0 +1,130 @@ + + + + + asList + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

asList

+
+

Returns a live List view backed by this deque.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/as-mutable-list.html b/docs/-kubit/kubit.collections.deque/as-mutable-list.html new file mode 100644 index 0000000..3e3c24e --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/as-mutable-list.html @@ -0,0 +1,130 @@ + + + + + asMutableList + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

asMutableList

+
+

Returns a live MutableList view backed by this deque. Structural changes are reflected both ways.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.deque/index.html b/docs/-kubit/kubit.collections.deque/index.html new file mode 100644 index 0000000..b3e9def --- /dev/null +++ b/docs/-kubit/kubit.collections.deque/index.html @@ -0,0 +1,232 @@ + + + + + kubit.collections.deque + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Package-level declarations

+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
class DoubleDeque(initialCapacity: Int)

DoubleDeque is a double-ended queue for Double values backed by a circular buffer.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
class FloatDeque(initialCapacity: Int)

FloatDeque is a double-ended queue for Float values backed by a circular buffer.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
class IntDeque(initialCapacity: Int)

IntDeque is a double-ended queue for Int values backed by a circular buffer.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
class LongDeque(initialCapacity: Int)

LongDeque is a double-ended queue for Long values backed by a circular buffer.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live List view backed by this deque.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a live MutableList view backed by this deque. Structural changes are reflected both ways.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/docs/-kubit/kubit.collections.inplace/-in-place-sub-list/fast-for-each-indexed.html b/docs/-kubit/kubit.collections.inplace/-in-place-sub-list/fast-for-each-indexed.html index ce196f4..ee484c7 100644 --- a/docs/-kubit/kubit.collections.inplace/-in-place-sub-list/fast-for-each-indexed.html +++ b/docs/-kubit/kubit.collections.inplace/-in-place-sub-list/fast-for-each-indexed.html @@ -111,7 +111,7 @@

fastForEachIndexed

-
inline fun fastForEachIndexed(action: (index: Int, T) -> Unit)(source)

Performs the given action for each element in this sublist, providing its index relative to this sublist.

This method is faster and more efficient than List.forEachIndexed.

Parameters

action

The function to be executed

+
inline fun fastForEachIndexed(action: (index: Int, T) -> Unit)(source)

Performs the given action for each element in this sublist, providing its index relative to this sublist.

This method is faster and more efficient than List.forEachIndexed.

Parameters

action

The function to be executed