Scoop API

scoop:scoop.std:0.1.0

ArrayDeque

class ArrayDeque

source · line 7
public
public class ArrayDeque<T> public constructor() : Collection<T>

A growable double-ended queue with constant-time indexed ring-buffer access at either end. Structural changes invalidate active iterators.

function removeLast

source · line 80
public
public fun removeLast(): T

Removes and returns the back element; an empty queue throws NoSuchElementException.

function firstOrNone

source · line 57
public
public fun firstOrNone(): T?

Returns the front element without removing it, or None when empty.

function removeFirst

source · line 66
public
public fun removeFirst(): T

Removes and returns the front element; an empty queue throws NoSuchElementException.

function iterator

source · line 115
public
public override operator fun iterator(): Iterator<T>

Iterates from front to back; structural changes invalidate the iterator.

function removeFirstOrNone

source · line 94
public
public fun removeFirstOrNone(): T?

Removes the front element, or returns None when empty.

function lastOrNone

source · line 61
public
public fun lastOrNone(): T?

Returns the back element without removing it, or None when empty.

function removeLastOrNone

source · line 98
public
public fun removeLastOrNone(): T?

Removes the back element, or returns None when empty.