commons-issues mailing list archives

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


Gilles commented on LANG-1387:

{quote}Is there an eclipse format configuration file so that all the spaces bracesetc are
I don't know; it is perhaps a good suggestion for the "dev" ML.
 Otherwise, such issues are reported by "CheckStyle" (locally when you run "mvn site") and
maybe by the Travis run.
{quote}There is no reasons that other implementations could not exist.
How would another implementation behave differently while still abiding by the contract?
{quote}What is the recommended separation for the common packages?
There is no common convention; each component has its own habits, I think.
 IMHO, the straightforward design is a class containing factory method(s). See e.g. the discussion
about Complex.
{quote}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.
I see this as further support that alternative implementations are unlikely.
 Having a single class implement the requested functionality solves the issue of splitting
"base" and "utility" methods.

As a side point, if the "span" tools where defined in their own module, it could target Java
{quote}On the underflow/overflow issues. Is there any reason not to use components from other
commons packages?
Not a priori. However, historically, it has been preferred to copy code rather than have dependencies.
 The current development version of "Commons Math" depends on modules in "Commons Numbers".
{quote}Are there packages that are offlimits due to possible circular dependencies?
The issue hasn't occurred yet (AFAIK). IMO, it would indicate a design problem.
{quote}FastMath component in math3 would be useful for the underflow/overflowchecking.
Any low-level, self-contained, code in "Commons Math" is a candidate for being moved to ["Commons

We should continue this conversation on the "dev" ML. ;)

> 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