The Wayback Machine - https://web.archive.org/web/20211004155716/https://github.com/topics/kotlin-extensions
Skip to content
#

kotlin-extensions

Here are 263 public repositories matching this topic...

ktx
czyzby
czyzby commented Mar 3, 2021

Extend existing collection extension methods like isEmpty and isNotEmpty to include contracts that imply whenever the verified collections are not null.

For example:

/**
 * @return true if the array is null or has no elements.
 */
@OptIn(ExperimentalContracts::class)
fun <Type> GdxArray<Type>?.isEmpty(): Boolean {
  contract {
    returns(false) implies (this@isEmpty != nu
kiwisincebirth
kiwisincebirth commented Sep 29, 2021

Motivation

The use of Kotlin Math Extensions is limited as it is missing several methods specific to sum() and average() of typed fluxes such as BigDecimal. I write financial application(s) which uses BigDecimal as a preference, using floats and doubles is discouraged, hence the need for Big Decimal specific implementations.

As such I have to implement these missing functions in my own

kotlin-mvvm-hilt-flow-app

Kotlin first app using Clean Architecture with MVVM pattern along with Android Architecture Components such as LiveData, ViewModel, Navigation and idiomatic Kotlin using extension functions, type-aliases, Coroutines and Dependency Injection using Hilt
  • Updated Mar 29, 2021
  • Kotlin

Improve this page

Add a description, image, and links to the kotlin-extensions topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the kotlin-extensions topic, visit your repo's landing page and select "manage topics."

Learn more