On 18 May 2011 16:37, Gary Gregory <garydgreg...@gmail.com> wrote:
> The bigger issue in my mind is why a Range does not extend Pair. It's pretty
> clear (to me at least) that a range is a pair of values.

Please start a new thread for that issue.

AFAICT that would not help improve the performance of the Escaper
classes and the utility classes that call them.

> Because the Pair is in our tuple package, it means that it should follow
> tuple logic and be an ordered list of elements, in this case two elements.
>
> This means that the methods that Range has that are not in Pair could be
> moved there.
>
> Gary
>
> On Wed, May 18, 2011 at 9:53 AM, sebb <seb...@gmail.com> wrote:
>
>> I'm not happy with the boxing that is often needed to create a Range
>> of int or long, e.g. in StringEscapeUtils.
>>
>> Seems to me that the UnicodeEscaper and NumericEntityEscaper classes
>> should require ints rather than a Range, as this would cut down on the
>> boxing and unboxing that is currently needed, as well as the extra
>> code needed to provide comparisons etc.
>>
>> Or, there could be a specialised IntRange class using int to provide
>> the functionality.
>>
>> These changes are new to 3.0, so could be fixed now without backward
>> compat. problems.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>>
>>
>
>
> --
> Thank you,
> Gary
>
> http://garygregory.wordpress.com/
> http://garygregory.com/
> http://people.apache.org/~ggregory/
> http://twitter.com/GaryGregory
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to