Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 44933 invoked from network); 7 Feb 2010 05:48:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2010 05:48:50 -0000 Received: (qmail 52823 invoked by uid 500); 7 Feb 2010 05:48:50 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 52631 invoked by uid 500); 7 Feb 2010 05:48:49 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 52616 invoked by uid 99); 7 Feb 2010 05:48:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2010 05:48:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2010 05:48:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 265ED234C4A8 for ; Sat, 6 Feb 2010 21:48:28 -0800 (PST) Message-ID: <436902923.105121265521708155.JavaMail.jira@brutus.apache.org> Date: Sun, 7 Feb 2010 05:48:28 +0000 (UTC) From: "Matt Benson (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-588) Create a basic Pair class In-Reply-To: <931649863.99721265489127975.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830659#action_12830659 ] Matt Benson commented on LANG-588: ---------------------------------- I'll respond to your first three comments in order: * RE Javadoc of static methods: What are you looking for, beyond completing the @param tags such that checkstyle is happy? * RE @since: Okay. * RE static imports: don't know what to say; 'tis a matter of opinion. If as a community we turn out to fall in favor of not using static imports I will abide. WRT MatchedPair as Iterable, to be honest MatchedPair exists, in my mind, mostly because only when the L and R types of Pair are the same can we provide a typed Iterator. As for the tree walker concept, that never occurred to me though I suppose I can see where you're coming from now that you mention it. Perhaps your impression of a Pair as a LISP concept and my lack of similar background account for the difference in perspective. However, as you mentioned this would only really work if we sacrifice type-safety by making Pair Iterable, and in that case it could be argued that the whole notion of iterating over nested Iterables in depth-first or breadth-first fashion could be extracted to a completely separate class, and be a more versatile approach into the bargain, no? > Create a basic Pair 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 extends Pair as well. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.