<div class="gmail_quote">2009/8/31 Ceki Gulcu <span dir="ltr"><<a href="mailto:ceki@qos.ch">ceki@qos.ch</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span style="color: rgb(153, 153, 153);">Thank you Rick. FYI, you could replace the comparison of this.args and other.args (about 10 lines) with just Arrays.equals(this.args, other.args).</span><br></blockquote><div><br>Indeed - much simpler.<br>
<br>Â <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span style="color: rgb(153, 153, 153);">Moreover, you could implement hashCode as follows, which correct and efficient at the same time. Having args contribute to the hashCode is a waste of time.</span><br style="color: rgb(153, 153, 153);">
<br style="color: rgb(153, 153, 153);"><span style="color: rgb(153, 153, 153);">
 @Override</span><br style="color: rgb(153, 153, 153);"><span style="color: rgb(153, 153, 153);">
 public int hashCode() {</span><br style="color: rgb(153, 153, 153);"><span style="color: rgb(153, 153, 153);">
  return e.hashCode();</span><br style="color: rgb(153, 153, 153);"><span style="color: rgb(153, 153, 153);">
 }</span><br></blockquote><div><br>That's probably better (simpler often means better), but now hashCode() and equals() have different behaviour so there ought to be a remark in the JavaDoc to say so. It could, for example, mean that a hashtable of instances may be less efficient because more linear searching might happen.<br>
<br>Â </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span style="color: rgb(153, 153, 153);">
How about renaming ResourceMessage as MessageParameterObj. See also</span><br style="color: rgb(153, 153, 153);">
<br style="color: rgb(153, 153, 153);"><span style="color: rgb(153, 153, 153);">
 </span><a style="color: rgb(153, 153, 153);" href="http://www.refactoring.com/catalog/introduceParameterObject.html" target="_blank">http://www.refactoring.com/catalog/introduceParameterObject.html</a><br></blockquote>
<div><br>I see from the Git patch email you've already done this. :-D <br></div></div><br>-- <br>Big Bee Consultants Limited : Registered in England & Wales No. 6397941<br>Registered Office: 71 The Hundred, Romsey, Hampshire, SO51 8BZ<br>