commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <>
Subject [jira] Commented: (LANG-588) Create a basic Pair<L, R> class
Date Mon, 08 Feb 2010 21:55:27 GMT


Matt Benson commented on LANG-588:

Actually I'm now having second thoughts about how much call there is for iterating Pairs ;)
, and if there is there's a fairly quick way to do it already:
Pair<Integer, Double> pair = pairOf(10, 100d);
List<? extends Number> l = Arrays.asList(pair.left, pair.right);

So in this case, we could drop the iteration issue, calculate hashCode always, and be done?

> Create a basic Pair<L, R> class
> -------------------------------
>                 Key: LANG-588
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Matt Benson
>             Fix For: 3.0
>         Attachments:,,,
> [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.

View raw message