enum
inline fun <V : Enum<V>> FieldSet.Field<Int, Int>.enum(fieldValue: IntEnumValue<V>): FieldSet.Field<V, V>
Maps integer value to the corresponding enum variant.
Parameters
fieldValue
function that provides field value of an enum variant. It is not recommended to use Enum.ordinal property for field value as it can change when new variant is added.
inline fun <V : Enum<V>> FieldSet.Field<String, String>.enum(fieldValue: KeywordEnumValue<V>? = null): FieldSet.Field<V, V>
Maps string value to the corresponding enum variant.
Parameters
fieldValue
function that provides field value of an enum variant. Enum.name property will be used if fieldValue is not provided.