EnumHelp

object EnumHelp

Helps SDK to send and receive from native enum types Example:

enum class EExample(val value: Int){ First(0), Second(1);

override fun toString(): kotlin.String = value.toString()

}

usage: EnumHelp.fromInt(anIntValue)

Functions

Link copied to clipboard
inline fun <E : Enum<E>> fromInt(value: Int, default: E? = null): E

Converts an int value to specified enum type.

Link copied to clipboard
inline fun <E : Enum<E>> fromIntArray(value: ArrayList<Int>?): ArrayList<E>

Converts an array of int to an array of specified enum type.

Link copied to clipboard
inline fun <E : Enum<E>> fromOrdinal(ordinal: Int, default: E? = null): E

Converts an ordinal int to specified enum type.

Link copied to clipboard
inline fun <E : Enum<E>> toArray(): Array<E>

Returns all enum values as an array.

Link copied to clipboard
inline fun <E : Enum<E>> toIntArray(value: ArrayList<E>?): ArrayList<Int>

Converts an array of specified enum type to an array of int.