@Test public void parse() { assertEquals(expected, LanguageString.parseLocale(input)); }
@Nullable public static Locale parseLocale(@Nullable String languageString) { if (languageString == null || languageString.isEmpty()) { return null; } final Locale locale = createLocale(languageString); if (!isValid(locale)) { return null; } else { return locale; } }
LanguageString { @Nullable public static Locale parseLocale(@Nullable String languageString) { if (languageString == null || languageString.isEmpty()) { return null; } final Locale locale = createLocale(languageString); if (!isValid(locale)) { return null; } else { return locale; } } }
LanguageString { @Nullable public static Locale parseLocale(@Nullable String languageString) { if (languageString == null || languageString.isEmpty()) { return null; } final Locale locale = createLocale(languageString); if (!isValid(locale)) { return null; } else { return locale; } } private  LanguageString(); }
LanguageString { @Nullable public static Locale parseLocale(@Nullable String languageString) { if (languageString == null || languageString.isEmpty()) { return null; } final Locale locale = createLocale(languageString); if (!isValid(locale)) { return null; } else { return locale; } } private  LanguageString(); @Nullable static Locale parseLocale(@Nullable String languageString); }
LanguageString { @Nullable public static Locale parseLocale(@Nullable String languageString) { if (languageString == null || languageString.isEmpty()) { return null; } final Locale locale = createLocale(languageString); if (!isValid(locale)) { return null; } else { return locale; } } private  LanguageString(); @Nullable static Locale parseLocale(@Nullable String languageString);  }