@Test public void testToString() throws Exception { final String sorted = "EN#~#Some text#~#RU#~#Текст"; assertNotNull(sorted, new StringI18NModel("EN#~#Some text#~#RU#~#Текст").toString()); assertNotNull(sorted, new StringI18NModel("RU#~#Текст#~#EN#~#Some text").toString()); }
@Override public String toString() { if (toStringCache == null) { final StringBuilder out = new StringBuilder(); for (final Map.Entry<String, String> entry : values.entrySet()) { if (StringUtils.isNotBlank(entry.getValue())) { out.append(entry.getKey()).append(SEPARATOR).append(entry.getValue()).append(SEPARATOR); } } toStringCache = out.toString(); } return toStringCache; }
StringI18NModel implements I18NModel { @Override public String toString() { if (toStringCache == null) { final StringBuilder out = new StringBuilder(); for (final Map.Entry<String, String> entry : values.entrySet()) { if (StringUtils.isNotBlank(entry.getValue())) { out.append(entry.getKey()).append(SEPARATOR).append(entry.getValue()).append(SEPARATOR); } } toStringCache = out.toString(); } return toStringCache; } }
StringI18NModel implements I18NModel { @Override public String toString() { if (toStringCache == null) { final StringBuilder out = new StringBuilder(); for (final Map.Entry<String, String> entry : values.entrySet()) { if (StringUtils.isNotBlank(entry.getValue())) { out.append(entry.getKey()).append(SEPARATOR).append(entry.getValue()).append(SEPARATOR); } } toStringCache = out.toString(); } return toStringCache; } StringI18NModel(final I18NModel values);  StringI18NModel(final Map<String, String> values);  StringI18NModel(final String raw);  StringI18NModel(); }
StringI18NModel implements I18NModel { @Override public String toString() { if (toStringCache == null) { final StringBuilder out = new StringBuilder(); for (final Map.Entry<String, String> entry : values.entrySet()) { if (StringUtils.isNotBlank(entry.getValue())) { out.append(entry.getKey()).append(SEPARATOR).append(entry.getValue()).append(SEPARATOR); } } toStringCache = out.toString(); } return toStringCache; } StringI18NModel(final I18NModel values);  StringI18NModel(final Map<String, String> values);  StringI18NModel(final String raw);  StringI18NModel(); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override boolean equals(final Object o); @Override StringI18NModel copy(); @Override int hashCode(); @Override String toString(); }
StringI18NModel implements I18NModel { @Override public String toString() { if (toStringCache == null) { final StringBuilder out = new StringBuilder(); for (final Map.Entry<String, String> entry : values.entrySet()) { if (StringUtils.isNotBlank(entry.getValue())) { out.append(entry.getKey()).append(SEPARATOR).append(entry.getValue()).append(SEPARATOR); } } toStringCache = out.toString(); } return toStringCache; } StringI18NModel(final I18NModel values);  StringI18NModel(final Map<String, String> values);  StringI18NModel(final String raw);  StringI18NModel(); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override boolean equals(final Object o); @Override StringI18NModel copy(); @Override int hashCode(); @Override String toString();  }