commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claude Warren (JIRA)" <>
Subject [jira] [Commented] (LANG-1387) Add Span interfaces to handle checks for overlaps, containment, equality, etc.
Date Tue, 17 Apr 2018 09:38:00 GMT


Claude Warren commented on LANG-1387:

Is there an eclipse format configuration file so that all the spaces braces
etc are correct?

 * Interfaces are tied to a specific implementation ({{Impl}}).

Not sure how to correct this.  The idea here is that the interface defines
the contract and the impl is a reference implementation.  There is no
reasons that other implementations could not exist.  What is the
recommended separation for the common packages?

On the underflow/overflow issues.  Is there any reason not to use
components from other commons packages?  Are there packages that are
offlimits due to possible circular dependencies?  I am thinking that the
FastMath component in math3 would be useful for the underflow/overflow

* {{Util}} class is better avoided as some methods should be defined in the

If this was Java 8 I might put those in as default calculations.  However,
calcEnd() and calcLength() are provided so that spans that implement based
on the end or length can easily and correctly calculate the other.  Since
there is no support for default in the interface the Util class provides
the default implementations.  How should this be presented?

Since this might use the math3 package perhaps it should go there.  But in
any case I will need to clean up these issues.


On Mon, Apr 16, 2018 at 1:55 PM, Gilles (JIRA) <> wrote:

I like: Like Like - The likeliest place on the web

> Add Span interfaces to handle checks for overlaps, containment, equality, etc.
> ------------------------------------------------------------------------------
>                 Key: LANG-1387
>                 URL:
>             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

View raw message