[ 
https://issues.apache.org/jira/browse/LANG-1665?focusedWorklogId=626788&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-626788
 ]

ASF GitHub Bot logged work on LANG-1665:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jul/21 17:10
            Start Date: 22/Jul/21 17:10
    Worklog Time Spent: 10m 
      Work Description: aherbert commented on pull request #780:
URL: https://github.com/apache/commons-lang/pull/780#issuecomment-885074539


   @garydgregory I had inferred that the use in Tuple has been ruled out (which 
I agree with; equals should always use equals). This is a suggestion to 
downgrade to just a static method to compute equality. I am not convinced of 
the utility of such a method anyway. My point was that handling BigDecimal 
without handling other cases seems wrong. So without any use case perhaps this 
is a dead end.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 626788)
    Time Spent: 40m  (was: 0.5h)

> Modify Tuple equals to take BigDecimal comparison
> -------------------------------------------------
>
>                 Key: LANG-1665
>                 URL: https://issues.apache.org/jira/browse/LANG-1665
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.tuple.*
>    Affects Versions: 3.12.0
>            Reporter: Chikashi Toyoshima
>            Priority: Trivial
>             Fix For: 3.12.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> I understand that this would be a bit controversial. Imhp as possibly 
> ignorable suggestion, it'd be more helpful if the Tuple supports BgDecimal 
> numeric equality rather than simply checking object.
>  
> In a particular case, you may want to check if a collection of pairs contain 
> a certain pair which includes BigDecimal values. Then to check object 
> equality is maybe just right or not. But in many cases, I assume that numeric 
> comparison would be more demanded such as following simple example. 
> {code:java}
> Set<Pair<String, BigDecimal>> someCollection = getPairs(); 
> someCollection.contains(Pair.of("foo", BigDecimal.valueOf(100))); 
> {code}
>  
> I created the PR. Please take a look. I'm happy to whichever it is accepted 
> or not receiving feedback.
> [https://github.com/apache/commons-lang/pull/780]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to