/** Returns true if <code>o</code> is a MyWritable with the same values. */ @Override public boolean equals(Object o) { if (!(o instanceof MyWritable)) return false; MyWritable other = (MyWritable) o; return field1.equals(other.field1) && field2.equals(other.field2); }