One liners are OK, no problem they are fairly readable (not always), but what we have here requires some effort from the reader, thus I consider it error prone. You can't go wrong with a Switch, even Java programers can read them ;)