toEnum

fun <E : Enum<*>> EnumValue.toEnum(valueOf: (String) -> E): E

Converts an EnumValue to an enum of type E using the provided valueOf function.

Return

the enum of type E corresponding to the EnumValue

Parameters

valueOf

a function that converts an enum name to an enum of type E