I\'m trying to find the best way to do a \'reverse lookup\' on an enum in Kotlin. One of my takeaways from Effective Java was that you introduce a static map inside the enum
we can use find which Returns the first element matching the given predicate, or null if no such element was found.
companion object { fun valueOf(value: Int): Type? = Type.values().find { it.value == value } }