@Test public void testEquals() throws Exception { final I18NModel m1 = new StringI18NModel("EN#~#Some text#~#RU#~#Текст"); final I18NModel m2 = new StringI18NModel("EN#~#Some text#~#RU#~#Текст"); assertTrue(m1.equals(m2)); assertTrue(m2.equals(m1)); assertEquals(m2.hashCode(), m1.hashCode()); final I18NModel m3 = new StringI18NModel("EN#~#Some text#~#RU#~#Текст1"); assertFalse(m3.equals(m2)); assertFalse(m2.equals(m3)); assertNotEquals(m2.hashCode(), m3.hashCode()); }
@Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof StringI18NModel)) return false; final StringI18NModel that = (StringI18NModel) o; return toString().equals(that.toString()); }
StringI18NModel implements I18NModel { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof StringI18NModel)) return false; final StringI18NModel that = (StringI18NModel) o; return toString().equals(that.toString()); } }
StringI18NModel implements I18NModel { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof StringI18NModel)) return false; final StringI18NModel that = (StringI18NModel) o; return toString().equals(that.toString()); } StringI18NModel(final I18NModel values);  StringI18NModel(final Map<String, String> values);  StringI18NModel(final String raw);  StringI18NModel(); }
StringI18NModel implements I18NModel { @Override public boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof StringI18NModel)) return false; final StringI18NModel that = (StringI18NModel) o; return toString().equals(that.toString()); } 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 boolean equals(final Object o) { if (this == o) return true; if (!(o instanceof StringI18NModel)) return false; final StringI18NModel that = (StringI18NModel) o; return toString().equals(that.toString()); } 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();  }