/** Returns a hash value for this parameter. */ @Override public int hashCode() { int code = super.hashCode() * 37; final Object value = getValue(); if (value != null) { code += value.hashCode(); } return code ^ (int) serialVersionUID; }
/** Compares the specified object with this parameter for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final ImagingParameter that = (ImagingParameter) object; return Utilities.equals(this.getValue(), that.getValue()); } return false; }
/** * Returns a clone of this parameter. Actually returns a different classes, since this parameter * is not really cloneable (it would requires a clone of {@link #parameters} first). */ @Override public Parameter<T> clone() { final Parameter<T> parameter = new Parameter<T>(getDescriptor()); parameter.setValue(getValue()); return parameter; } }