@Test public void testEquals() { File f = new File(""); FilesystemNotification fsn1 = new FilesystemNotification(f, "", "", ENTRY_CREATE, null); FilesystemNotification fsn2 = new FilesystemNotification(f, "", "", ENTRY_CREATE, null); FilesystemNotification fsn3 = new FilesystemNotification(f, "", "", ENTRY_MODIFY, null); FilesystemNotification fsn4 = new FilesystemNotification(f, "a", "", ENTRY_CREATE, null); FilesystemNotification fsn5 = new FilesystemNotification(f, "", "b", ENTRY_CREATE, null); FilesystemNotification fsn6 = new FilesystemNotification(null, "", "", ENTRY_CREATE, null); FilesystemNotification fsn7 = new FilesystemNotification(null, "a", "b", ENTRY_CREATE, null); FilesystemNotification fsn8 = new FilesystemNotification(null, "", "b", ENTRY_CREATE, null); assertEquals(fsn1, fsn2); assertTrue(!fsn1.equals(fsn3)); assertTrue(!fsn1.equals(fsn4)); assertTrue(!fsn1.equals(fsn5)); assertTrue(!fsn1.equals(fsn6)); assertTrue(!fsn6.equals(fsn7)); assertTrue(!fsn7.equals(fsn8)); }
@Override public boolean equals(Object o) { return this.hashCode() == o.hashCode(); }
FilesystemNotification implements Callable<Void> { @Override public boolean equals(Object o) { return this.hashCode() == o.hashCode(); } }
FilesystemNotification implements Callable<Void> { @Override public boolean equals(Object o) { return this.hashCode() == o.hashCode(); } FilesystemNotification(File pFile, String pRelativePath, String pRootPath,
        WatchEvent.Kind<?> pEvtType, IFilelistenerWriteTrx pWtx); }
FilesystemNotification implements Callable<Void> { @Override public boolean equals(Object o) { return this.hashCode() == o.hashCode(); } FilesystemNotification(File pFile, String pRelativePath, String pRootPath,
        WatchEvent.Kind<?> pEvtType, IFilelistenerWriteTrx pWtx); File getFile(); String getRelativePath(); String getRootPath(); void setEvtType(WatchEvent.Kind<?> pEvtType); WatchEvent.Kind<?> getEvtType(); boolean isFinished(); @Override int hashCode(); @Override boolean equals(Object o); @Override Void call(); long getTime(); int getBucketAmount(); void notifyObservers(); void addObserver(FilesystemNotificationObserver observer); }
FilesystemNotification implements Callable<Void> { @Override public boolean equals(Object o) { return this.hashCode() == o.hashCode(); } FilesystemNotification(File pFile, String pRelativePath, String pRootPath,
        WatchEvent.Kind<?> pEvtType, IFilelistenerWriteTrx pWtx); File getFile(); String getRelativePath(); String getRootPath(); void setEvtType(WatchEvent.Kind<?> pEvtType); WatchEvent.Kind<?> getEvtType(); boolean isFinished(); @Override int hashCode(); @Override boolean equals(Object o); @Override Void call(); long getTime(); int getBucketAmount(); void notifyObservers(); void addObserver(FilesystemNotificationObserver observer);  }