/** * Returns a hash code value for this object. * * @return a hash code value for this object. */ public final int hashCode() { return this.getName().hashCode() + ( this.getVersion() == null ? 0 : this.getVersion().hashCode() ); }
/** * Indicates whether some other object is equal to this one by comparing * properties {@code name} and {@code version}. * * @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 final boolean equals( final Object o ) { boolean equal = this == o; if ( !equal && o instanceof Module ) { final Module that = (Module) o; equal = this.getName().equals( that.getName() ) && ( this.getVersion() == null ? that.getVersion() == null : this.getVersion().equals( that.getVersion() ) ); } return equal; }
append(' ').append(modules.getModule(i).getVersion()). append('\n');