secant-android-wallet/ui-lib/src/main/java/cash/z/ecc/ui/screen/onboarding/model/Index.kt

14 lines
297 B
Kotlin

package cash.z.ecc.ui.screen.onboarding.model
/**
* Useful for accessing arrays or lists by index.
*
* @param value A 0-based index. Must be >= 0
*/
@JvmInline
value class Index(val value: Int) {
init {
require(value >= 0) { "Index must be >= 0 but actually is $value" }
}
}