@Test public void inequality() { ImportStatement s = new ImportStatement(file.getParentFile(), file.getName(), MONITORS); ImportStatement s_selector = new ImportStatement(file.getParentFile(), file.getName(), RULES); ImportStatement s_fname = new ImportStatement(file.getParentFile(), file.getName() + "-different", MONITORS); ImportStatement s_dir = new ImportStatement(new File(file.getParentFile(), "othername"), file.getName(), MONITORS); assertFalse(s.equals(null)); assertFalse(s.equals(new Object())); assertFalse(s.equals(s_selector)); assertFalse(s.equals(s_fname)); assertFalse(s.equals(s_dir)); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ImportStatement other = (ImportStatement) obj; if (!Objects.equals(this.fname_, other.fname_)) { return false; } if (this.selector_ != other.selector_) { return false; } if (!Objects.equals(this.cfg_file_, other.cfg_file_)) { return false; } return true; }
ImportStatement implements ConfigStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ImportStatement other = (ImportStatement) obj; if (!Objects.equals(this.fname_, other.fname_)) { return false; } if (this.selector_ != other.selector_) { return false; } if (!Objects.equals(this.cfg_file_, other.cfg_file_)) { return false; } return true; } }
ImportStatement implements ConfigStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ImportStatement other = (ImportStatement) obj; if (!Objects.equals(this.fname_, other.fname_)) { return false; } if (this.selector_ != other.selector_) { return false; } if (!Objects.equals(this.cfg_file_, other.cfg_file_)) { return false; } return true; } ImportStatement(File dir, String fname);  ImportStatement(File dir, String fname, int selector); }
ImportStatement implements ConfigStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ImportStatement other = (ImportStatement) obj; if (!Objects.equals(this.fname_, other.fname_)) { return false; } if (this.selector_ != other.selector_) { return false; } if (!Objects.equals(this.cfg_file_, other.cfg_file_)) { return false; } return true; } ImportStatement(File dir, String fname);  ImportStatement(File dir, String fname, int selector); Configuration read(); File getConfigFile(); @Override StringBuilder configString(); @Override int hashCode(); @Override boolean equals(Object obj); }
ImportStatement implements ConfigStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ImportStatement other = (ImportStatement) obj; if (!Objects.equals(this.fname_, other.fname_)) { return false; } if (this.selector_ != other.selector_) { return false; } if (!Objects.equals(this.cfg_file_, other.cfg_file_)) { return false; } return true; } ImportStatement(File dir, String fname);  ImportStatement(File dir, String fname, int selector); Configuration read(); File getConfigFile(); @Override StringBuilder configString(); @Override int hashCode(); @Override boolean equals(Object obj); final static int CONSTANTS; final static int MONITORS; final static int RULES; final static int ALERTS; final static int ALL; }