http://issues.apache.org/bugzilla/show_bug.cgi?id=14884
The best way to fix this IMHO is to restrict the class to number ranges of a) the same Numebr type b) Number types that implement Comparable Thus this is allowed: new NumberRange(new Integer(6), new Integer(8)); and this is not: new NumberRange(new Integer(6), new Long(8)); I have an implementation sort of working that will work like this. The includesNumber(), includesRange() and overlaps() methods would also be limited to the same type. The addition of includesDouble(Double) etc. methods would allow comparison based on the results from doubleValue(), and thus cross-type checking. Do these changes sound OK? Do they break the API too much? (Its broken, and can't be fixed without some change - this seems to impact most people the least I suspect) Other solutions? Stephen
NumberRange.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>