[ 
https://issues.apache.org/jira/browse/LANG-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16439392#comment-16439392
 ] 

Gilles commented on LANG-1387:
------------------------------

{quote}This does not seem to fit in any of the existing commons-numbers 
categories. Are you suggesting a new category? If so what would the category 
for span would be?
{quote}
Nothing prevents us from creating a new module for that functionality.
 Then, if so, some utilities from ["ArithmeticUtils" 
class|https://git1-us-west.apache.org/repos/asf?p=commons-numbers.git;a=blob;f=commons-numbers-core/src/main/java/org/apache/commons/numbers/core/ArithmeticUtils.java]
 should be used (or added to that class).

I had a quick look at the PR; I noticed the following problems:
 * Tabs.
 * Indentation (should be 4 spaces).
 * Opening brace position.
 * Interfaces are tied to a specific implementation ({{Impl}}).
 * {{Impl}} is _public_.
 * Truncated method method names (e.g. {{calcEnd}}).
 * Method {{isUnderflow}} is used where {{checkOverflow}} is meant.
 * {{Util}} class is better avoided as some methods should be defined in the 
class/interface (e.g. {{calcEnd}}, {{toString}}, ...), and others are 
potentially confusing (e.g. {{overlaps}}).

> Add Span interfaces to handle checks for overlaps, containment, equality, etc.
> ------------------------------------------------------------------------------
>
>                 Key: LANG-1387
>                 URL: https://issues.apache.org/jira/browse/LANG-1387
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*, lang.math.*
>    Affects Versions: 3.7
>            Reporter: Claude Warren
>            Priority: Minor
>
> This is a contribution of a span class as discussed on the mailing list.
> The classes are int and long based and can:
>  # determine if points are within the span.
>  # determine if one span contains another span
>  # determine if two spans overlap
>  # do not have to have 0 (zero) as the index origin.
>  # determine the length of the span
>  # determine the last position in the span.
>  # determine the first position in the span.
> Changes to Number Utils required to detect underflow and overflow 
> calculations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to