Skip to content
#

libgdx

Here are 1,134 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

Improve this page

Add a description, image, and links to the libgdx 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 libgdx topic, visit your repo's landing page and select "manage topics."

Learn more