@Test public void parsesWildcardLanguage() throws Exception { Language result = Languages.fromString("*"); assertThat(result,not(nullValue())); assertThat(result.locale(),nullValue()); assertThat(result.isWildcard(),equalTo(true)); assertThat(result.primaryTag(),equalTo("*")); assertThat(result.subTag(),nullValue()); }
public static Language fromString(final String language) { requireNonNull(language,"Language cannot be null"); if(WILDCARD.equals(language)) { return wildcard(); } else { return of(parseLocale(language)); } }
Languages { public static Language fromString(final String language) { requireNonNull(language,"Language cannot be null"); if(WILDCARD.equals(language)) { return wildcard(); } else { return of(parseLocale(language)); } } }
Languages { public static Language fromString(final String language) { requireNonNull(language,"Language cannot be null"); if(WILDCARD.equals(language)) { return wildcard(); } else { return of(parseLocale(language)); } } private  Languages(); }
Languages { public static Language fromString(final String language) { requireNonNull(language,"Language cannot be null"); if(WILDCARD.equals(language)) { return wildcard(); } else { return of(parseLocale(language)); } } private  Languages(); static Language wildcard(); static Language of(final Locale locale); static Language fromString(final String language); static boolean includes(final Language language1, final Language language2); }
Languages { public static Language fromString(final String language) { requireNonNull(language,"Language cannot be null"); if(WILDCARD.equals(language)) { return wildcard(); } else { return of(parseLocale(language)); } } private  Languages(); static Language wildcard(); static Language of(final Locale locale); static Language fromString(final String language); static boolean includes(final Language language1, final Language language2);  }