@Test public void testEquals() { Application app = new Application( "app", new ApplicationTemplate()); Assert.assertFalse( app.equals( null )); Assert.assertFalse( app.equals( new Application( app.getTemplate()))); Assert.assertFalse( app.equals( new Object())); Assert.assertEquals( app, app ); Assert.assertEquals( app, new Application( "app", app.getTemplate())); Assert.assertEquals( app, new Application( "app", new ApplicationTemplate( "whatever" ))); }
@Override public boolean equals( Object obj ) { return obj instanceof Application && Objects.equals( this.name, ((Application) obj ).getName()); }
Application extends AbstractApplication implements Serializable { @Override public boolean equals( Object obj ) { return obj instanceof Application && Objects.equals( this.name, ((Application) obj ).getName()); } }
Application extends AbstractApplication implements Serializable { @Override public boolean equals( Object obj ) { return obj instanceof Application && Objects.equals( this.name, ((Application) obj ).getName()); } Application( ApplicationTemplate template );  Application( String name, ApplicationTemplate template ); }
Application extends AbstractApplication implements Serializable { @Override public boolean equals( Object obj ) { return obj instanceof Application && Objects.equals( this.name, ((Application) obj ).getName()); } Application( ApplicationTemplate template );  Application( String name, ApplicationTemplate template ); ApplicationTemplate getTemplate(); @Override Graphs getGraphs(); Map<String,String> getExternalExports(); @Override boolean equals( Object obj ); @Override int hashCode(); Application name( String name ); Application description( String description ); Application directory( File directory ); void removeAssociationWithTemplate(); void bindWithApplication( String externalExportPrefix, String applicationName ); boolean unbindFromApplication( String externalExportPrefix, String applicationName ); boolean replaceApplicationBindings( String externalExportPrefix, Set<String> applicationNames ); Map<String,Set<String>> getApplicationBindings(); }
Application extends AbstractApplication implements Serializable { @Override public boolean equals( Object obj ) { return obj instanceof Application && Objects.equals( this.name, ((Application) obj ).getName()); } Application( ApplicationTemplate template );  Application( String name, ApplicationTemplate template ); ApplicationTemplate getTemplate(); @Override Graphs getGraphs(); Map<String,String> getExternalExports(); @Override boolean equals( Object obj ); @Override int hashCode(); Application name( String name ); Application description( String description ); Application directory( File directory ); void removeAssociationWithTemplate(); void bindWithApplication( String externalExportPrefix, String applicationName ); boolean unbindFromApplication( String externalExportPrefix, String applicationName ); boolean replaceApplicationBindings( String externalExportPrefix, Set<String> applicationNames ); Map<String,Set<String>> getApplicationBindings();  }