@Test public void testSetLanguageResolution() { content.setDefaultLanguage(french); content.setLanguageResolution(LanguageResolution.Default); assertEquals(LanguageResolution.Default, content.getLanguageResolution()); assertEquals(french, content.switchTo(italian)); }
public void setLanguageResolution(LanguageResolution behavior) throws IllegalStateException { if (Default.equals(behavior) && defaultLanguage == null) throw new IllegalStateException("Must specify default language first"); if (Original.equals(behavior) && originalLanguage == null && languages.size() > 0) throw new IllegalStateException("Must specify original language first"); this.behavior = behavior; }
LocalizableObject implements Localizable { public void setLanguageResolution(LanguageResolution behavior) throws IllegalStateException { if (Default.equals(behavior) && defaultLanguage == null) throw new IllegalStateException("Must specify default language first"); if (Original.equals(behavior) && originalLanguage == null && languages.size() > 0) throw new IllegalStateException("Must specify original language first"); this.behavior = behavior; } }
LocalizableObject implements Localizable { public void setLanguageResolution(LanguageResolution behavior) throws IllegalStateException { if (Default.equals(behavior) && defaultLanguage == null) throw new IllegalStateException("Must specify default language first"); if (Original.equals(behavior) && originalLanguage == null && languages.size() > 0) throw new IllegalStateException("Must specify original language first"); this.behavior = behavior; } LocalizableObject();  LocalizableObject(Language defaultLanguage); }
LocalizableObject implements Localizable { public void setLanguageResolution(LanguageResolution behavior) throws IllegalStateException { if (Default.equals(behavior) && defaultLanguage == null) throw new IllegalStateException("Must specify default language first"); if (Original.equals(behavior) && originalLanguage == null && languages.size() > 0) throw new IllegalStateException("Must specify original language first"); this.behavior = behavior; } LocalizableObject();  LocalizableObject(Language defaultLanguage); void addLocalizationListener(LocalizationListener listener); void removeLocalizationListener(LocalizationListener listener); void enableLanguage(Language language); void disableLanguage(Language language); Language switchTo(Language language); Language switchTo(Language language, boolean force); Language getLanguage(); void setLanguageResolution(LanguageResolution behavior); LanguageResolution getLanguageResolution(); void setDefaultLanguage(Language language); Language getDefaultLanguage(); Language getOriginalLanguage(); void setOriginalLanguage(Language language); boolean supportsLanguage(Language language); Set<Language> languages(); int compareTo(Localizable o, Language l); String toString(); String toString(Language language); String toString(Language language, boolean force); }
LocalizableObject implements Localizable { public void setLanguageResolution(LanguageResolution behavior) throws IllegalStateException { if (Default.equals(behavior) && defaultLanguage == null) throw new IllegalStateException("Must specify default language first"); if (Original.equals(behavior) && originalLanguage == null && languages.size() > 0) throw new IllegalStateException("Must specify original language first"); this.behavior = behavior; } LocalizableObject();  LocalizableObject(Language defaultLanguage); void addLocalizationListener(LocalizationListener listener); void removeLocalizationListener(LocalizationListener listener); void enableLanguage(Language language); void disableLanguage(Language language); Language switchTo(Language language); Language switchTo(Language language, boolean force); Language getLanguage(); void setLanguageResolution(LanguageResolution behavior); LanguageResolution getLanguageResolution(); void setDefaultLanguage(Language language); Language getDefaultLanguage(); Language getOriginalLanguage(); void setOriginalLanguage(Language language); boolean supportsLanguage(Language language); Set<Language> languages(); int compareTo(Localizable o, Language l); String toString(); String toString(Language language); String toString(Language language, boolean force);  }