commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <>
Subject Re: [VOTE] Release Commons Lang 3.0 (RC1)
Date Thu, 03 Mar 2011 19:08:21 GMT
On 3 March 2011 18:56, Matt Benson <> wrote:
> [SNIP]
>> I don't love the new Pair class. We have an interface based version
>> here at OpenGamma to allow primitive implementations for performance.
>> I might be able to get our code released if there was interest.
> Providing interfaces without code that consumes them doesn't feel like
> [lang]'s mission; this is akin to providing exceptions we don't use
> IMHO.  It might be okay for Pair<L, R> to implement Map.Entry<L, R>,
> for example.  But when you say primitive implementations, do you mean
> implementations based around primitive types, or simplistic
> implementations?  If the latter, how much more simplistic could it
> get?

Our OpenGamma pair is an abstract class (not an interface!):
public abstract class Pair<A, B> implements Map.Entry<A, B>,
Comparable<Pair<A, B>>, Serializable

There are concrete implementations for ObjectsPair, DoublesPair,
IntDoublePair etc. where the user can access the primitive type
directly, or just use the base generified class. The question is
whether [lang] wants no Pair, a simple one, or a full-featured one
(where people may disagree on what full-featured should look like).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message