@Test public void testHashCodeWithTheADifferentName() { import1.setName(new Name("123")); import2.setName(new Name("456")); assertNotEquals(import1.hashCode(), import2.hashCode()); }
@Override public int hashCode() { return HashUtil.combineHashCodes(id != null ? id.hashCode() : 0, description != null ? description.hashCode() : 0, name != null ? name.hashCode() : 0, namespace != null ? namespace.hashCode() : 0, locationURI != null ? locationURI.hashCode() : 0, importType != null ? importType.hashCode() : 0); }
Import extends NamedElement { @Override public int hashCode() { return HashUtil.combineHashCodes(id != null ? id.hashCode() : 0, description != null ? description.hashCode() : 0, name != null ? name.hashCode() : 0, namespace != null ? namespace.hashCode() : 0, locationURI != null ? locationURI.hashCode() : 0, importType != null ? importType.hashCode() : 0); } }
Import extends NamedElement { @Override public int hashCode() { return HashUtil.combineHashCodes(id != null ? id.hashCode() : 0, description != null ? description.hashCode() : 0, name != null ? name.hashCode() : 0, namespace != null ? namespace.hashCode() : 0, locationURI != null ? locationURI.hashCode() : 0, importType != null ? importType.hashCode() : 0); } Import();  Import(final String namespace,
                  final LocationURI locationURI,
                  final String importType); }
Import extends NamedElement { @Override public int hashCode() { return HashUtil.combineHashCodes(id != null ? id.hashCode() : 0, description != null ? description.hashCode() : 0, name != null ? name.hashCode() : 0, namespace != null ? namespace.hashCode() : 0, locationURI != null ? locationURI.hashCode() : 0, importType != null ? importType.hashCode() : 0); } Import();  Import(final String namespace,
                  final LocationURI locationURI,
                  final String importType); String getNamespace(); void setNamespace(final String namespace); LocationURI getLocationURI(); void setLocationURI(final LocationURI locationURI); String getImportType(); void setImportType(final String importType); @Override boolean equals(final Object o); @Override int hashCode(); }
Import extends NamedElement { @Override public int hashCode() { return HashUtil.combineHashCodes(id != null ? id.hashCode() : 0, description != null ? description.hashCode() : 0, name != null ? name.hashCode() : 0, namespace != null ? namespace.hashCode() : 0, locationURI != null ? locationURI.hashCode() : 0, importType != null ? importType.hashCode() : 0); } Import();  Import(final String namespace,
                  final LocationURI locationURI,
                  final String importType); String getNamespace(); void setNamespace(final String namespace); LocationURI getLocationURI(); void setLocationURI(final LocationURI locationURI); String getImportType(); void setImportType(final String importType); @Override boolean equals(final Object o); @Override int hashCode();  }