/** * Returns a hash code value for this object. * * @return a hash code value for this object. */ public int hashCode() { int hc = 23; hc = 37 * hc + this.getIndex(); hc = 37 * hc + this.getName().hashCode(); hc = 37 * hc + this.getType(); return hc; }
/** * Indicates whether some other object is equal to this one by comparing * the values of all properties. * * @param o the reference object with which to compare. * * @return {@code true} if this object is the same as {@code o}; * {@code false} otherwise. */ public boolean equals( final Object o ) { boolean equal = this == o; if ( !equal && o instanceof Argument ) { final Argument that = (Argument) o; equal = this.getIndex() == that.getIndex() && this.getType() == that.getType() && this.getName().equals( that.getName() ); } return equal; }