commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-588) Create a basic Pair<L, R> class
Date Tue, 09 Feb 2010 09:17:32 GMT

    [ https://issues.apache.org/jira/browse/LANG-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831373#action_12831373
] 

Stephen Colebourne commented on LANG-588:
-----------------------------------------

I have no specific requirement for a List. However I would advise against an Iterable, simply
because its not that widely accepted in other APIs.

The ability to merge pairs into a single list will be a requested feature I suspect.

As I said, I'm strongly against caching the hash code - premature optimisation and unsafe
with mutable classes.

> Create a basic Pair<L, R> class
> -------------------------------
>
>                 Key: LANG-588
>                 URL: https://issues.apache.org/jira/browse/LANG-588
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Matt Benson
>             Fix For: 3.0
>
>         Attachments: MatchedPair.java, MatchedPairTest.java, Pair.java, PairTest.java
>
>
> [lang] is the perfect place to provide a basic typed Pair class.  I have written such
a class for my employer (who hasn't?) but can/will rewrite blind to avoid IP issues.  I think
it's also nice to go ahead and extend this to MatchedPair<T> extends Pair<T, T>
as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message