static Sex parseSex(String input) { switch (input) { case 'M': return Sex.male; case 'F': return Sex.female; default: return Sex.none; } }