@Test public void notEqualsOtherType() { final OSData osd = new OSData(code, name, version, mfg_code); assertFalse(osd.equals("bogus")); assertFalse("bogus".equals(osd)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OSData)) return false; final OSData d = (OSData) o; return code.equals(d.code) && name.equals(d.name) && version.equals(d.version) && mfg_code.equals(d.mfg_code); }
OSData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OSData)) return false; final OSData d = (OSData) o; return code.equals(d.code) && name.equals(d.name) && version.equals(d.version) && mfg_code.equals(d.mfg_code); } }
OSData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OSData)) return false; final OSData d = (OSData) o; return code.equals(d.code) && name.equals(d.name) && version.equals(d.version) && mfg_code.equals(d.mfg_code); } OSData(String code, String name, String version, String mfg_code); }
OSData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OSData)) return false; final OSData d = (OSData) o; return code.equals(d.code) && name.equals(d.name) && version.equals(d.version) && mfg_code.equals(d.mfg_code); } OSData(String code, String name, String version, String mfg_code); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
OSData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OSData)) return false; final OSData d = (OSData) o; return code.equals(d.code) && name.equals(d.name) && version.equals(d.version) && mfg_code.equals(d.mfg_code); } 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; }