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

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

Thanks for the contribution; the suggestions look fine.
A few things I'd change: 
* "create" instead of "of"
* a static factory method to create the comparator

Could you please summarize this proposal in a post to the "dev" ML?

Also, independent issues should have their own patch; in this case, it's quite 
easy to sort it out, so I can do it myself (once you get positive feedback from 
the list).


> 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.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 ".of()" 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