Hi Christopher, Definitely seems worth including. I've got a math.Interval class I wrote to be a range of two doubles (while reading a lisp book) and was wondering if you'd think the following methods would do well in NumberRange:
NumberRange add(NumberRange) NumberRange sub(NumberRange) NumberRange mul(NumberRange) NumberRange div(NumberRange) the hard part would be deciding what kind of Number to use when returning. Not sure I can see an easy solution that wouldn't invovle replicating the whole Java maths operator data type casting thing. So if one is a range of Integer and one is a range of Float, and it's an add, then you make a range of Float. Or something. Any ideas? On Sun, 24 Feb 2002, Christopher Elkins wrote: > Hi, all. > > Attached are a class representing a range of Number instances and its > associated unit-test class. I hope they are suitable for inclusion in the > new lang sandbox module. > > (P.S. Why are seemingly all of the commons modules allergic to using Ant's > <junit> task? I couldn't get the current test target to work at all, so I > was forced to hack in a temporary target in order to execute my NumberRangeTest > class succesfully.) > > -- > Christopher Elkins > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
