@UseDataProvider("forTestLanguageToString") @Test public void testLanguageToString(Language language, String expectedResult) { assertEquals(expectedResult, language.toString()); }
@Override public final String toString() { StringBuilder sb = new StringBuilder(); sb.append(primaryTag); if (!subTag.isEmpty()) { sb.append('-').append(subTag); } return sb.toString(); }
Language { @Override public final String toString() { StringBuilder sb = new StringBuilder(); sb.append(primaryTag); if (!subTag.isEmpty()) { sb.append('-').append(subTag); } return sb.toString(); } }
Language { @Override public final String toString() { StringBuilder sb = new StringBuilder(); sb.append(primaryTag); if (!subTag.isEmpty()) { sb.append('-').append(subTag); } return sb.toString(); } Language(Locale locale); }
Language { @Override public final String toString() { StringBuilder sb = new StringBuilder(); sb.append(primaryTag); if (!subTag.isEmpty()) { sb.append('-').append(subTag); } return sb.toString(); } Language(Locale locale); String getPrimaryTag(); String getSubTag(); Locale getLocale(); boolean isCompatible(Language other); @Override final String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
Language { @Override public final String toString() { StringBuilder sb = new StringBuilder(); sb.append(primaryTag); if (!subTag.isEmpty()) { sb.append('-').append(subTag); } return sb.toString(); } Language(Locale locale); String getPrimaryTag(); String getSubTag(); Locale getLocale(); boolean isCompatible(Language other); @Override final String toString(); @Override boolean equals(Object o); @Override int hashCode();  }