@Test public void testEquals() { assertEquals(new Application("com.apple.textedit"), new Application("com.apple.textedit")); assertEquals(new Application("com.apple.textedit"), new Application("com.apple.textedit", "TextEdit")); assertEquals(new Application("com.apple.textedit"), new Application("com.apple.TextEdit")); assertEquals(new Application("com.apple.textedit"), new Application("com.apple.TextEdit", "TextEdit")); }
@Override public boolean equals(final Object o) { if(this == o) { return true; } if(!(o instanceof Application)) { return false; } final Application that = (Application) o; if(!Objects.equals(identifier, that.identifier)) { return false; } return true; }
Application { @Override public boolean equals(final Object o) { if(this == o) { return true; } if(!(o instanceof Application)) { return false; } final Application that = (Application) o; if(!Objects.equals(identifier, that.identifier)) { return false; } return true; } }
Application { @Override public boolean equals(final Object o) { if(this == o) { return true; } if(!(o instanceof Application)) { return false; } final Application that = (Application) o; if(!Objects.equals(identifier, that.identifier)) { return false; } return true; } Application(final String identifier);  Application(final String identifier, final String name); }
Application { @Override public boolean equals(final Object o) { if(this == o) { return true; } if(!(o instanceof Application)) { return false; } final Application that = (Application) o; if(!Objects.equals(identifier, that.identifier)) { return false; } return true; } Application(final String identifier);  Application(final String identifier, final String name); String getIdentifier(); String getName(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
Application { @Override public boolean equals(final Object o) { if(this == o) { return true; } if(!(o instanceof Application)) { return false; } final Application that = (Application) o; if(!Objects.equals(identifier, that.identifier)) { return false; } return true; } Application(final String identifier);  Application(final String identifier, final String name); String getIdentifier(); String getName(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final Application notfound; }