@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof UnloadedMessageResult) { @SuppressWarnings("unchecked") UnloadedMessageResult<Id> that = (UnloadedMessageResult<Id>) obj; return (size == that.size) && (uid == that.uid) && (modSeq == that.modSeq) && exception.equals(that.exception) && internalDate.equals(that.internalDate) && flags.equals(that.flags); } return false; }