OperatingSystem implements ReadableOperatingSystem, Serializable { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + family.hashCode(); result = prime * result + familyName.hashCode(); result = prime * result + icon.hashCode(); result = prime * result + name.hashCode(); result = prime * result + producer.hashCode(); result = prime * result + producerUrl.hashCode(); result = prime * result + url.hashCode(); result = prime * result + versionNumber.hashCode(); return result; } OperatingSystem(@Nonnull final OperatingSystemFamily family, @Nonnull final String familyName, @Nonnull final String icon,
			@Nonnull final String name, @Nonnull final String producer, @Nonnull final String producerUrl, @Nonnull final String url,
			@Nonnull final VersionNumber versionNumber); @Override boolean equals(final Object obj); @Override OperatingSystemFamily getFamily(); @Override String getFamilyName(); @Override String getIcon(); @Override String getName(); @Override String getProducer(); @Override String getProducerUrl(); @Override String getUrl(); @Override VersionNumber getVersionNumber(); @Override int hashCode(); @Override String toString(); static final OperatingSystem EMPTY; }
@Test public void testHashCode() { final OperatingSystemFamily linux = OperatingSystemFamily.LINUX; final OperatingSystem os1 = new OperatingSystem(linux, "family", "icon", "name", "producer", "producer url", "url", new VersionNumber("1")); final OperatingSystem os2 = new OperatingSystem(linux, "family", "icon", "name", "producer", "producer url", "url", new VersionNumber("1")); assertThat(os2.hashCode()).isEqualTo(os1.hashCode()); }
@Test public void testHashCode_EMPTY() { assertThat(OperatingSystem.EMPTY.hashCode()).isEqualTo(OperatingSystem.EMPTY.hashCode()); }