@Test public void hashCodeSame() { final MfgData a = new MfgData(code, name); final MfgData b = new MfgData(code, name); assertTrue(a.hashCode() == b.hashCode()); }
@Override public int hashCode() { return new HashCodeBuilder().append(code).append(name).toHashCode(); }
MfgData { @Override public int hashCode() { return new HashCodeBuilder().append(code).append(name).toHashCode(); } }
MfgData { @Override public int hashCode() { return new HashCodeBuilder().append(code).append(name).toHashCode(); } MfgData(String code, String name); }
MfgData { @Override public int hashCode() { return new HashCodeBuilder().append(code).append(name).toHashCode(); } MfgData(String code, String name); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
MfgData { @Override public int hashCode() { return new HashCodeBuilder().append(code).append(name).toHashCode(); } MfgData(String code, String name); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final String code; final String name; }