@Test public void hashCodeDifferent() { final OSData a = new OSData(code, name, version, mfg_code); final OSData b = new OSData(code, name, version, "JonsMom"); assertTrue(a.hashCode() != b.hashCode()); }
@Override public int hashCode() { return new HashCodeBuilder().append(code) .append(name) .append(version) .append(mfg_code) .toHashCode(); }
OSData { @Override public int hashCode() { return new HashCodeBuilder().append(code) .append(name) .append(version) .append(mfg_code) .toHashCode(); } }
OSData { @Override public int hashCode() { return new HashCodeBuilder().append(code) .append(name) .append(version) .append(mfg_code) .toHashCode(); } OSData(String code, String name, String version, String mfg_code); }
OSData { @Override public int hashCode() { return new HashCodeBuilder().append(code) .append(name) .append(version) .append(mfg_code) .toHashCode(); } OSData(String code, String name, String version, String mfg_code); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
OSData { @Override public int hashCode() { return new HashCodeBuilder().append(code) .append(name) .append(version) .append(mfg_code) .toHashCode(); } OSData(String code, String name, String version, String mfg_code); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final String code; final String name; final String version; final String mfg_code; }