@Test void equals() throws URISyntaxException { assertEquals(new DefaultExtensionRepositoryDescriptor("id", "type", new URI("uri:uri")), new DefaultExtensionRepositoryDescriptor("id", "type", new URI("uri:uri"))); assertNotEquals(new DefaultExtensionRepositoryDescriptor("id", "type", new URI("uri:uri")), new DefaultExtensionRepositoryDescriptor("id2", "type", new URI("uri:uri"))); assertNotEquals(new DefaultExtensionRepositoryDescriptor("id", "type", new URI("uri:uri")), new DefaultExtensionRepositoryDescriptor("id", "type2", new URI("uri:uri"))); assertNotEquals(new DefaultExtensionRepositoryDescriptor("id", "type", new URI("uri:uri")), new DefaultExtensionRepositoryDescriptor("id", "type", new URI("uri:uri2"))); DefaultExtensionRepositoryDescriptor descriptor1 = new DefaultExtensionRepositoryDescriptor("id"); DefaultExtensionRepositoryDescriptor descriptor2 = new DefaultExtensionRepositoryDescriptor("id"); descriptor1.putProperty("key", "value"); assertNotEquals(descriptor1, descriptor2); descriptor2.putProperty("key", "value"); assertEquals(descriptor1, descriptor2); }
@Override public boolean equals(Object obj) { if (obj instanceof ExtensionRepositoryDescriptor) { ExtensionRepositoryDescriptor repository = (ExtensionRepositoryDescriptor) obj; return Objects.equals(getId(), repository.getId()) && Objects.equals(getType(), repository.getType()) && Objects.equals(getURI(), repository.getURI()) && Objects.equals(getProperties(), repository.getProperties()); } return false; }
DefaultExtensionRepositoryDescriptor implements ExtensionRepositoryDescriptor { @Override public boolean equals(Object obj) { if (obj instanceof ExtensionRepositoryDescriptor) { ExtensionRepositoryDescriptor repository = (ExtensionRepositoryDescriptor) obj; return Objects.equals(getId(), repository.getId()) && Objects.equals(getType(), repository.getType()) && Objects.equals(getURI(), repository.getURI()) && Objects.equals(getProperties(), repository.getProperties()); } return false; } }
DefaultExtensionRepositoryDescriptor implements ExtensionRepositoryDescriptor { @Override public boolean equals(Object obj) { if (obj instanceof ExtensionRepositoryDescriptor) { ExtensionRepositoryDescriptor repository = (ExtensionRepositoryDescriptor) obj; return Objects.equals(getId(), repository.getId()) && Objects.equals(getType(), repository.getType()) && Objects.equals(getURI(), repository.getURI()) && Objects.equals(getProperties(), repository.getProperties()); } return false; } DefaultExtensionRepositoryDescriptor(ExtensionRepositoryDescriptor descriptor);  DefaultExtensionRepositoryDescriptor(String id);  DefaultExtensionRepositoryDescriptor(String id, String type, URI uri); @Unstable  DefaultExtensionRepositoryDescriptor(String id, String type, URI uri, Map<String, String> properties); }
DefaultExtensionRepositoryDescriptor implements ExtensionRepositoryDescriptor { @Override public boolean equals(Object obj) { if (obj instanceof ExtensionRepositoryDescriptor) { ExtensionRepositoryDescriptor repository = (ExtensionRepositoryDescriptor) obj; return Objects.equals(getId(), repository.getId()) && Objects.equals(getType(), repository.getType()) && Objects.equals(getURI(), repository.getURI()) && Objects.equals(getProperties(), repository.getProperties()); } return false; } DefaultExtensionRepositoryDescriptor(ExtensionRepositoryDescriptor descriptor);  DefaultExtensionRepositoryDescriptor(String id);  DefaultExtensionRepositoryDescriptor(String id, String type, URI uri); @Unstable  DefaultExtensionRepositoryDescriptor(String id, String type, URI uri, Map<String, String> properties); @Override String getId(); @Override String getType(); @Override URI getURI(); @Override Map<String, String> getProperties(); @Override String getProperty(String key); void putProperty(String key, String value); void setProperties(Map<String, String> properties); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
DefaultExtensionRepositoryDescriptor implements ExtensionRepositoryDescriptor { @Override public boolean equals(Object obj) { if (obj instanceof ExtensionRepositoryDescriptor) { ExtensionRepositoryDescriptor repository = (ExtensionRepositoryDescriptor) obj; return Objects.equals(getId(), repository.getId()) && Objects.equals(getType(), repository.getType()) && Objects.equals(getURI(), repository.getURI()) && Objects.equals(getProperties(), repository.getProperties()); } return false; } DefaultExtensionRepositoryDescriptor(ExtensionRepositoryDescriptor descriptor);  DefaultExtensionRepositoryDescriptor(String id);  DefaultExtensionRepositoryDescriptor(String id, String type, URI uri); @Unstable  DefaultExtensionRepositoryDescriptor(String id, String type, URI uri, Map<String, String> properties); @Override String getId(); @Override String getType(); @Override URI getURI(); @Override Map<String, String> getProperties(); @Override String getProperty(String key); void putProperty(String key, String value); void setProperties(Map<String, String> properties); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }