Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/foxcapades/lib-unsigned-atomics

Atomic value wrappers for Kotlin's unsigned types.
https://github.com/foxcapades/lib-unsigned-atomics

atomic integer kotlin library thread unsigned unsigned-integers

Last synced: 14 days ago
JSON representation

Atomic value wrappers for Kotlin's unsigned types.

Awesome Lists containing this project

README

        

= Unsigned Atomics
:source-highlighter: highlightjs

image:https://img.shields.io/badge/docs-dokka-green[title="Dokka Docs", link="https://foxcapades.github.io/lib-unsigned-atomics/dokka/"]
image:https://img.shields.io/badge/java-1.8-blue[title="Compatible with Java version 1.8"]
image:https://img.shields.io/maven-central/v/io.foxcapades.lib/unsigned-atomics[Maven Central, link="https://search.maven.org/search?q=g:io.foxcapades.lib%20AND%20a:unsigned-atomics"]

Provides atomic wrappers for Kotlin's unsigned types.

Each type includes operator functions for arithmetic operations and comparisons
with all integral types as well as all `unsigned-atomics` types.

.**Usage**
[source, kotlin]
----
val atomicUByte = AtomicUByte()

atomicUByte++
atomicUByte--
atomicUByte += 36
atomicUByte -= 22L
atomicUByte > 42u
atomicUByte /= AtomicUShort(10u)
atomicUByte *= AtomicULong(2)
atomicUByte == AtomicUByte(0)

val value = atomicUByte.value
----