Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9266A105A9 for ; Sun, 15 Sep 2013 19:18:37 +0000 (UTC) Received: (qmail 32484 invoked by uid 500); 15 Sep 2013 19:18:34 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 32392 invoked by uid 500); 15 Sep 2013 19:18:34 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Delivered-To: moderator for dev@commons.apache.org Received: (qmail 24998 invoked by uid 99); 15 Sep 2013 19:06:40 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michele.rossi@gmail.com designates 209.85.214.179 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=nLc4YdVbcDf2uwDEYyCL7sqwxyaO6iG7RynfUWw4Yss=; b=TxyWmBL96Zu2kZYEkvf5sExkBJF0yO6XxkpKf4H9l8Xk3Pbp2xJ0whnMSYMD5op+Ay 6js7AwN8D6nUPZzkUSRdOirnFvjWmu/aUky2mviZMzPR67udF5BcD/0l7j2Md0wB4NS+ qAU+lrucQ0MqscGE38cd/h2rxk+xWidphCUJjubbKi9Hgkj2J4E7X72M7tfCd2TsMjxd OekfUCeu/mOlZs9j4NF0HeOfrCbdiNi20P7DkHrG7g9WGvS2md/FToDoqH+RZAjS8Dyn eJUPZrGodPdb/NBaz4iF1OBa1JiUwK59wPAGB40eGkaBshRWvSSAWPRQuEJBfpjQ80kX Q+EQ== X-Received: by 10.60.60.105 with SMTP id g9mr22500695oer.8.1379271974766; Sun, 15 Sep 2013 12:06:14 -0700 (PDT) MIME-Version: 1.0 From: Michele Rossi Date: Sun, 15 Sep 2013 21:05:54 +0200 Message-ID: Subject: [csv] should CSVRecord's values() method be public? To: dev@commons.apache.org Content-Type: multipart/alternative; boundary=089e0149d0ae1acf1d04e670c826 X-Virus-Checked: Checked by ClamAV on apache.org --089e0149d0ae1acf1d04e670c826 Content-Type: text/plain; charset=ISO-8859-1 hi, I am trying to use commons-csv for a simple CSV transformation tool and I have encountered a couple of issues that I would like to discuss. The CSVPrinter takes object arrays as input but the "values" method of CSVRecord is not public. In the code I am writing I check a condition to determine whether I should transform the CSVRecord or not. But the if that condition returns "false" I am forced to make an akward copy of the CSVRecord in an object array as - CSVRecord objects can not be fed to CSVPrinter - CSVRecord's values() method is not public If "values()" was public I could use the data read from one CSV to directly feed another CSV. Seems a reasonable use case. Also, shouldn't CSVRecord implement Map ? The key could be the column header. It would make sense right? Or am I missing something? thanks, Michele --089e0149d0ae1acf1d04e670c826--