poohbar
10/27/2017, 3:38 PMenum class Color(val name: String) {
RED("red"),
GREEN("green"),
BLUE("blue")
}
and I would like to have a function which tells me whether the name corresponds to any of the enum instances:
isContainedInEnum("blue") == true
Any good way to do this? The syntax can be a bit different if needed.