@Test public void testEquals() { final NullSession session = new NullSession(new Host(new TestProtocol())); assertEquals( new DisabledEditor(new Application("i"), new StatelessSessionPool(new TestLoginConnectionService(), session, PathCache.empty(), new DisabledTranscriptListener(), new DefaultVaultRegistry(new DisabledPasswordCallback())), new Path("/p/f", EnumSet.of(Path.Type.file))), new DisabledEditor(new Application("i"), new StatelessSessionPool(new TestLoginConnectionService(), session, PathCache.empty(), new DisabledTranscriptListener(), new DefaultVaultRegistry(new DisabledPasswordCallback())), new Path("/p/f", EnumSet.of(Path.Type.file))) ); assertNotEquals( new DisabledEditor(new Application("i"), new StatelessSessionPool(new TestLoginConnectionService(), session, PathCache.empty(), new DisabledTranscriptListener(), new DefaultVaultRegistry(new DisabledPasswordCallback())), new Path("/p/f", EnumSet.of(Path.Type.file))), new DisabledEditor(new Application("i"), new StatelessSessionPool(new TestLoginConnectionService(), session, PathCache.empty(), new DisabledTranscriptListener(), new DefaultVaultRegistry(new DisabledPasswordCallback())), new Path("/p/g", EnumSet.of(Path.Type.file))) ); assertNotEquals( new DisabledEditor(new Application("a"), new StatelessSessionPool(new TestLoginConnectionService(), session, PathCache.empty(), new DisabledTranscriptListener(), new DefaultVaultRegistry(new DisabledPasswordCallback())), new Path("/p/f", EnumSet.of(Path.Type.file))), new DisabledEditor(new Application("i"), new StatelessSessionPool(new TestLoginConnectionService(), session, PathCache.empty(), new DisabledTranscriptListener(), new DefaultVaultRegistry(new DisabledPasswordCallback())), new Path("/p/f", EnumSet.of(Path.Type.file))) ); }
@Override public boolean equals(Object o) { if(this == o) { return true; } if(o == null || getClass() != o.getClass()) { return false; } AbstractEditor that = (AbstractEditor) o; if(!Objects.equals(application, that.application)) { return false; } if(!Objects.equals(local, that.local)) { return false; } return true; }
AbstractEditor implements Editor { @Override public boolean equals(Object o) { if(this == o) { return true; } if(o == null || getClass() != o.getClass()) { return false; } AbstractEditor that = (AbstractEditor) o; if(!Objects.equals(application, that.application)) { return false; } if(!Objects.equals(local, that.local)) { return false; } return true; } }
AbstractEditor implements Editor { @Override public boolean equals(Object o) { if(this == o) { return true; } if(o == null || getClass() != o.getClass()) { return false; } AbstractEditor that = (AbstractEditor) o; if(!Objects.equals(application, that.application)) { return false; } if(!Objects.equals(local, that.local)) { return false; } return true; } AbstractEditor(final Application application,
                          final SessionPool session,
                          final Path file,
                          final ProgressListener listener);  AbstractEditor(final Application application,
                          final SessionPool session,
                          final Path file,
                          final ApplicationLauncher launcher,
                          final ApplicationFinder finder,
                          final ProgressListener listener); }
AbstractEditor implements Editor { @Override public boolean equals(Object o) { if(this == o) { return true; } if(o == null || getClass() != o.getClass()) { return false; } AbstractEditor that = (AbstractEditor) o; if(!Objects.equals(application, that.application)) { return false; } if(!Objects.equals(local, that.local)) { return false; } return true; } AbstractEditor(final Application application,
                          final SessionPool session,
                          final Path file,
                          final ProgressListener listener);  AbstractEditor(final Application application,
                          final SessionPool session,
                          final Path file,
                          final ApplicationLauncher launcher,
                          final ApplicationFinder finder,
                          final ProgressListener listener); Path getRemote(); Local getLocal(); Application getApplication(); boolean isModified(); void setModified(boolean modified); @Override void delete(); @Override Worker<Transfer> open(final ApplicationQuitCallback quit, final TransferErrorCallback error, final FileWatcherListener listener); @Override Worker<Transfer> save(final TransferErrorCallback error); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
AbstractEditor implements Editor { @Override public boolean equals(Object o) { if(this == o) { return true; } if(o == null || getClass() != o.getClass()) { return false; } AbstractEditor that = (AbstractEditor) o; if(!Objects.equals(application, that.application)) { return false; } if(!Objects.equals(local, that.local)) { return false; } return true; } AbstractEditor(final Application application,
                          final SessionPool session,
                          final Path file,
                          final ProgressListener listener);  AbstractEditor(final Application application,
                          final SessionPool session,
                          final Path file,
                          final ApplicationLauncher launcher,
                          final ApplicationFinder finder,
                          final ProgressListener listener); Path getRemote(); Local getLocal(); Application getApplication(); boolean isModified(); void setModified(boolean modified); @Override void delete(); @Override Worker<Transfer> open(final ApplicationQuitCallback quit, final TransferErrorCallback error, final FileWatcherListener listener); @Override Worker<Transfer> save(final TransferErrorCallback error); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }