MapCompanion
Encapsulates a Map into a more limited query API.
This is most useful as an Enum companion, to provide parsing of raw values.
enum class Layout(val value: String) {
PAGINATED("paginated"),
REFLOWABLE("reflowable");
companion object : KeyMapper<String, Layout>(values(), Layout::value)
}
val layout: Layout? = Layout("reflowable")Content copied to clipboard