@Test void equals() throws Exception { Configuration conf = Configuration.builder("ja.hankaku") .addValidatorConfig(new ValidatorConfiguration("SentenceLength")).build(); Configuration clone = conf.clone(); assertEquals(conf, clone); assertEquals(conf.hashCode(), clone.hashCode()); clone.getValidatorConfigs().remove(0); assertFalse(conf.equals(clone)); clone = conf.clone(); clone.getSymbolTable().overrideSymbol(new Symbol(AMPERSAND, '^')); assertFalse(conf.equals(clone)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Configuration)) return false; Configuration that = (Configuration)o; return Objects.equals(lang, that.lang) && Objects.equals(symbolTable, that.symbolTable) && Objects.equals(validatorConfigs, that.validatorConfigs); }
Configuration implements Serializable, Cloneable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Configuration)) return false; Configuration that = (Configuration)o; return Objects.equals(lang, that.lang) && Objects.equals(symbolTable, that.symbolTable) && Objects.equals(validatorConfigs, that.validatorConfigs); } }
Configuration implements Serializable, Cloneable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Configuration)) return false; Configuration that = (Configuration)o; return Objects.equals(lang, that.lang) && Objects.equals(symbolTable, that.symbolTable) && Objects.equals(validatorConfigs, that.validatorConfigs); } Configuration(File base, SymbolTable symbolTable, List<ValidatorConfiguration> validatorConfigs, String lang, boolean secure); }
Configuration implements Serializable, Cloneable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Configuration)) return false; Configuration that = (Configuration)o; return Objects.equals(lang, that.lang) && Objects.equals(symbolTable, that.symbolTable) && Objects.equals(validatorConfigs, that.validatorConfigs); } Configuration(File base, SymbolTable symbolTable, List<ValidatorConfiguration> validatorConfigs, String lang, boolean secure); static List<String> getDefaultConfigKeys(); SymbolTable getSymbolTable(); List<ValidatorConfiguration> getValidatorConfigs(); String getLang(); String getVariant(); RedPenTokenizer getTokenizer(); String getKey(); File getHome(); File getBase(); File findFile(String relativePath); boolean isSecure(); @Override Configuration clone(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static ConfigurationBuilder builder(); static ConfigurationBuilder builder(String key); }
Configuration implements Serializable, Cloneable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Configuration)) return false; Configuration that = (Configuration)o; return Objects.equals(lang, that.lang) && Objects.equals(symbolTable, that.symbolTable) && Objects.equals(validatorConfigs, that.validatorConfigs); } Configuration(File base, SymbolTable symbolTable, List<ValidatorConfiguration> validatorConfigs, String lang, boolean secure); static List<String> getDefaultConfigKeys(); SymbolTable getSymbolTable(); List<ValidatorConfiguration> getValidatorConfigs(); String getLang(); String getVariant(); RedPenTokenizer getTokenizer(); String getKey(); File getHome(); File getBase(); File findFile(String relativePath); boolean isSecure(); @Override Configuration clone(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static ConfigurationBuilder builder(); static ConfigurationBuilder builder(String key);  }