On 2011-03-04, Matt Benson wrote: > Another interesting concept mentioned in this article is the > summarized by the statement "Another way of formalizing tuples is as > nested ordered pairs." I would argue that this is the only efficient > way to formally represent an n-tuple using Java generics without > writing one class per value of n.
To go even further off topic 8-) .NET 4's classlib has Tuple<T1, T2> up to one with nine generics and the recommended approach for more than nine is to use a Tuple of appropriate length as the last type of the nine generics Tuple. The accessors are Item1 to Item9. Given that .NET's generics implementation is quite a bit more advanced than Java's they don't need to implement special cases for primitives. > Call it a pair, call it an association, but let's call it done. +1 even if I'm not even a user of [lang]. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org