A Range object supplies information about what values a particular Property can be set to. It contains the following methods:
Returns true if obj is a valid argument to the property’s set method. The optional argument errMsg, if not null, is used to return an error message in case the object is not valid.
Trys to turn obj into a valid argument for set(). If obj is a valid argument, then it is returned directly. Otherwise, the method tries to return an object close to obj that is in the valid range. If this is not possible, the method returns Range.IllegalValue.
Intersects the current range with another range and placed the result in this range. The resulting range should admit values that were admissible by both previous ranges.
Returns true if this range has no admissible values. This is most likely to occur as the result of an intersection operation.
Possible usage of a range object is shown below:
Two common examples of Range objects are DoubleInterval and IntegerInterval, which implement intervals of double and integer values, respectively. Ranges are also Clonable, which means that they can be duplicated by calling range.clone().