文字列を列挙型に変換したい。しかし、どのように?
class Letter {
A, B, C
}
String letter = "A";
switch (letter) {
case Letter.A: //cannot convert from Letter to String
case Letter.A.toString(): //case expressions must be constant expressions
case Letter.C.name(): //case expressions must be constant expressions
default:
}