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

Gilles commented on MATH-1041:
------------------------------

bq. [...] it gets strange if different method names are used to do the same.

In principle, I agree of course, but the question is whether we should have 
consistency with Lang in preference to internal consistency.
If I'm not mistaken, we have (or are going to have) other factory methods, and 
it won't make sense to name those "of".

If the CM's Pair is _really_ intended as a placeholder for the Lang's class, 
and it is foreseeable that the "no dependency" requirement will be dropped, 
then I would be fine changing the name.
If it's here to stay, I'd slightly favour internal consistency... :)


> Add Pair factory method, toString(), Comparator 
> ------------------------------------------------
>
>                 Key: MATH-1041
>                 URL: https://issues.apache.org/jira/browse/MATH-1041
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.2
>            Reporter: Sean Owen
>            Priority: Minor
>              Labels: comparator, pair
>         Attachments: MATH-1041_Comparator.patch, MATH-1041_Pair.patch
>
>
> I use Commons Math heavily, and have adopted its Pair class for the cases 
> where I need, well, a pair of things.
> The attached patch adds three small improvements to the Pair class:
> - toString() method
> - factory method ".create()" to avoid duplicating generic types on instance 
> creation
> - a Comparator
> Tests are included. I won't feel offended if this is rejected or modified but 
> just wanted to supply  the suggestion.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to