
Pure FIFO queue implementation supports creation from varargs, collections, and custom configurations. Features include appending, retrieving, iterating, and array operations like `copyToArray` and `flushToArray`.
= K-Queue :source-highlighter: highlightjs :lib-version: 0.4.0 :feature-version: 0.4.0 :gh-docs-url: https://k-libs.github.io/k-queue/dokka :package-name: io.klibs.collections
image:https://img.shields.io/badge/license-MIT-green[GitHub] image:https://img.shields.io/badge/docs-dokka-brightgreen[link="{gh-docs-url}/{feature-version}/queue/{package-name}/"] image:https://img.shields.io/maven-central/v/io.k-libs/queue[link="https://search.maven.org/artifact/io.k-libs/queue"]
A pure Kotlin FIFO queue implementation.
== Import
== Usage
// Create a queue from varargs! val queue = queueOf(1, 2, 3)
// Create a queue from a collection! val queue = queueOf(list(1, 2, 3))
// Create a queue the boring way! val queue = Queue()
// Get crazy with it! val queue = Queue( initialCapacity = 16, scaleFactor = 2F, maxSize = 64 )
// Put stuff into a queue! queue.append(4)
// Get stuff out! val nextValue = queue.next()
== Version History
[%header, cols="1m,2,9"] |=== | Version | Documentation | Description
| v0.4.0
| link:{gh-docs-url}/0.3.0/queue/{package-name}/[Dokka]
| Add copyToArray and flushToArray
| v0.3.0 | link:{gh-docs-url}/0.3.0/queue/{package-name}/[Dokka] | Breaking minor rewrite, see https://github.com/k-libs/k-queue/releases/tag/v0.3.0[release notes].
| v0.2.0
| link:{gh-docs-url}/0.2.0/queue/{package-name}/[Dokka]
| Add clear() method to Queue type.
| v0.1.0 | link:{gh-docs-url}/0.1.0/queue/{package-name}/[Dokka] | Initial release. |===
= K-Queue :source-highlighter: highlightjs :lib-version: 0.4.0 :feature-version: 0.4.0 :gh-docs-url: https://k-libs.github.io/k-queue/dokka :package-name: io.klibs.collections
image:https://img.shields.io/badge/license-MIT-green[GitHub] image:https://img.shields.io/badge/docs-dokka-brightgreen[link="{gh-docs-url}/{feature-version}/queue/{package-name}/"] image:https://img.shields.io/maven-central/v/io.k-libs/queue[link="https://search.maven.org/artifact/io.k-libs/queue"]
A pure Kotlin FIFO queue implementation.
== Import
== Usage
// Create a queue from varargs! val queue = queueOf(1, 2, 3)
// Create a queue from a collection! val queue = queueOf(list(1, 2, 3))
// Create a queue the boring way! val queue = Queue()
// Get crazy with it! val queue = Queue( initialCapacity = 16, scaleFactor = 2F, maxSize = 64 )
// Put stuff into a queue! queue.append(4)
// Get stuff out! val nextValue = queue.next()
== Version History
[%header, cols="1m,2,9"] |=== | Version | Documentation | Description
| v0.4.0
| link:{gh-docs-url}/0.3.0/queue/{package-name}/[Dokka]
| Add copyToArray and flushToArray
| v0.3.0 | link:{gh-docs-url}/0.3.0/queue/{package-name}/[Dokka] | Breaking minor rewrite, see https://github.com/k-libs/k-queue/releases/tag/v0.3.0[release notes].
| v0.2.0
| link:{gh-docs-url}/0.2.0/queue/{package-name}/[Dokka]
| Add clear() method to Queue type.
| v0.1.0 | link:{gh-docs-url}/0.1.0/queue/{package-name}/[Dokka] | Initial release. |===