LanguageLevel (String value) { if (value == null) { return LanguageLevel.NONE; } if (isVersion1(value)) { return LanguageLevel.V1; } if (isVersion2(value)) { return LanguageLevel.V2; } if (isVersion3(value)) { return LanguageLevel.V2; } return LanguageLevel.NONE; }