@Test public void testCopy() throws Exception { final I18NModel model = new FailoverStringI18NModel("EN#~#Some text#~#RU#~#Текст#~#UK#~##~#xx#~#model failover", "failover"); final I18NModel copy = model.copy(); assertEquals(copy, model); copy.putValue("EN", "Changed"); assertEquals("Some text", model.getValue("EN")); assertEquals("Changed", copy.getValue("EN")); }
@Override public I18NModel copy() { return new FailoverStringI18NModel(model.copy(), failover); }
FailoverStringI18NModel implements I18NModel { @Override public I18NModel copy() { return new FailoverStringI18NModel(model.copy(), failover); } }
FailoverStringI18NModel implements I18NModel { @Override public I18NModel copy() { return new FailoverStringI18NModel(model.copy(), failover); } FailoverStringI18NModel(final String localisable, final String failover);  FailoverStringI18NModel(final Map<String, String> values, final String failover);  FailoverStringI18NModel(final I18NModel model, final String failover);  FailoverStringI18NModel(final I18NModel model, final String failover, final boolean updateDefault); }
FailoverStringI18NModel implements I18NModel { @Override public I18NModel copy() { return new FailoverStringI18NModel(model.copy(), failover); } FailoverStringI18NModel(final String localisable, final String failover);  FailoverStringI18NModel(final Map<String, String> values, final String failover);  FailoverStringI18NModel(final I18NModel model, final String failover);  FailoverStringI18NModel(final I18NModel model, final String failover, final boolean updateDefault); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override I18NModel copy(); @Override boolean equals(final Object o); @Override int hashCode(); }
FailoverStringI18NModel implements I18NModel { @Override public I18NModel copy() { return new FailoverStringI18NModel(model.copy(), failover); } FailoverStringI18NModel(final String localisable, final String failover);  FailoverStringI18NModel(final Map<String, String> values, final String failover);  FailoverStringI18NModel(final I18NModel model, final String failover);  FailoverStringI18NModel(final I18NModel model, final String failover, final boolean updateDefault); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override I18NModel copy(); @Override boolean equals(final Object o); @Override int hashCode();  }