/* * Abstract Methods */ /// <summary> /// Makes a copy of this PUCValue object. Inherited from the /// ICloneable interface. /// </summary> /// <returns>a shallow copy of this PUCValue object</returns> public object Clone() { PUCValue val = new PUCValue(this._valueSpace); val._value = this._value; val._definedValue = this._definedValue; return(val); }
/// <summary> /// Compares the values within two value spaces, and returns a result /// based on a comparison of the values stored within the space objects. /// The function returns 0 if the values are equal, and non-zero if the /// values are not equal. If greater-than and less-than relations make /// sense for the space (NumberSpaces), -1 is returned when this.value < /// val and 1 is returned when this.value > val. /// /// This function assumes that the ValueSpaces are equivalent. The /// results of this function are not meaningful otherwise, and an /// exception may be thrown if the spaces are significantly different. /// </summary> /// <param name="space">a ValueSpace to compare to this one</param> /// <returns>an integer describing how the values of these spaces are related</returns> public int CompareValues(PUCValue val) { return(this._valueSpace.CompareValues(this, val)); }