@Test public void testEquals() { assertEqualsContract( new PageData(new byte[] { 1, 2, 3 }, "image/png"), new PageData(new byte[] { 1, 2, 3 }, "image/png"), new PageData(new byte[] { 1, 2, 3 }, "image/png"), new PageData(new byte[] { 1, 2, 4 }, "image/png")); }
@Override public boolean equals(Object o) { if (o == this) { return true; } else if ((o != null) && o.getClass().equals(getClass())) { PageData other = (PageData) o; return new EqualsBuilder() .append(data, other.data) .append(contentType, other.contentType) .isEquals(); } return false; }
PageData { @Override public boolean equals(Object o) { if (o == this) { return true; } else if ((o != null) && o.getClass().equals(getClass())) { PageData other = (PageData) o; return new EqualsBuilder() .append(data, other.data) .append(contentType, other.contentType) .isEquals(); } return false; } }
PageData { @Override public boolean equals(Object o) { if (o == this) { return true; } else if ((o != null) && o.getClass().equals(getClass())) { PageData other = (PageData) o; return new EqualsBuilder() .append(data, other.data) .append(contentType, other.contentType) .isEquals(); } return false; } PageData(byte[] data, String contentType); }
PageData { @Override public boolean equals(Object o) { if (o == this) { return true; } else if ((o != null) && o.getClass().equals(getClass())) { PageData other = (PageData) o; return new EqualsBuilder() .append(data, other.data) .append(contentType, other.contentType) .isEquals(); } return false; } PageData(byte[] data, String contentType); byte[] getData(); @Override boolean equals(Object o); @Override int hashCode(); }
PageData { @Override public boolean equals(Object o) { if (o == this) { return true; } else if ((o != null) && o.getClass().equals(getClass())) { PageData other = (PageData) o; return new EqualsBuilder() .append(data, other.data) .append(contentType, other.contentType) .isEquals(); } return false; } PageData(byte[] data, String contentType); byte[] getData(); @Override boolean equals(Object o); @Override int hashCode();  }