2009/8/31 Ceki Gulcu <ceki@qos.ch>
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).

Indeed - much simpler.

 
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.

 @Override
 public int hashCode() {
   return e.hashCode();
 }

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.

 
How about renaming ResourceMessage as MessageParameterObj. See also

 http://www.refactoring.com/catalog/introduceParameterObject.html

I see from the Git patch email you've already done this.  :-D

--
Big Bee Consultants Limited : Registered in England & Wales No. 6397941
Registered Office: 71 The Hundred, Romsey, Hampshire, SO51 8BZ