getEnum

fun <E : Enum<E>?> getEnum(clazz: Class<E>?, name: String?): E?

Returns the matching enum instance based on a input string.

Return

the matching instance of null

Parameters

clazz

the enum class

name

the name of the enum to match

the enum type