@Test public void equalsSame() { final HashData a = new HashData( sha1, md5, crc32, name, size, prod_code, os_code, special_code); final HashData b = new HashData( sha1, md5, crc32, name, size, prod_code, os_code, special_code); assertTrue(a.equals(b)); assertTrue(b.equals(a)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof HashData)) return false; final HashData d = (HashData) o; return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) && Arrays.equals(crc32, d.crc32) && name.equals(d.name) && size == d.size && prod_code == d.prod_code && os_code.equals(d.os_code) && special_code.equals(d.special_code); }
HashData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof HashData)) return false; final HashData d = (HashData) o; return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) && Arrays.equals(crc32, d.crc32) && name.equals(d.name) && size == d.size && prod_code == d.prod_code && os_code.equals(d.os_code) && special_code.equals(d.special_code); } }
HashData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof HashData)) return false; final HashData d = (HashData) o; return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) && Arrays.equals(crc32, d.crc32) && name.equals(d.name) && size == d.size && prod_code == d.prod_code && os_code.equals(d.os_code) && special_code.equals(d.special_code); } HashData(
    byte[] sha1, byte[] md5, byte[] crc32, String name, long size,
    int prod_code, String os_code, String special_code); }
HashData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof HashData)) return false; final HashData d = (HashData) o; return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) && Arrays.equals(crc32, d.crc32) && name.equals(d.name) && size == d.size && prod_code == d.prod_code && os_code.equals(d.os_code) && special_code.equals(d.special_code); } HashData(
    byte[] sha1, byte[] md5, byte[] crc32, String name, long size,
    int prod_code, String os_code, String special_code); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
HashData { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof HashData)) return false; final HashData d = (HashData) o; return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) && Arrays.equals(crc32, d.crc32) && name.equals(d.name) && size == d.size && prod_code == d.prod_code && os_code.equals(d.os_code) && special_code.equals(d.special_code); } HashData(
    byte[] sha1, byte[] md5, byte[] crc32, String name, long size,
    int prod_code, String os_code, String special_code); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final byte[] sha1; final byte[] md5; final byte[] crc32; final String name; final long size; final int prod_code; final String os_code; final String special_code; }