Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9A4F62004F3 for ; Tue, 15 Aug 2017 16:01:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 98A7D166AD3; Tue, 15 Aug 2017 14:01:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DF225166AD2 for ; Tue, 15 Aug 2017 16:01:57 +0200 (CEST) Received: (qmail 55040 invoked by uid 500); 15 Aug 2017 14:01:56 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 55028 invoked by uid 99); 15 Aug 2017 14:01:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2017 14:01:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C5D3EC0324 for ; Tue, 15 Aug 2017 14:01:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id t7NYjOKOyfNF for ; Tue, 15 Aug 2017 14:01:54 +0000 (UTC) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4CAA55F520 for ; Tue, 15 Aug 2017 14:01:54 +0000 (UTC) Received: by mail-it0-f41.google.com with SMTP id m34so15059713iti.1 for ; Tue, 15 Aug 2017 07:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7KoWR7YfSlxUuAc12Djnq3+XBSiuwpntiAuTt3ZYpok=; b=aiHf/DhJiL1YRToJpPQ+0aV5+32Vm+IcZBPWF+xAP71d5t99rgNVFmv+d+9pMDZROc IsbRimnC/p2teydWgNCG4fB8rqLad1COU4Xzgz+sXchDtwCa7k8eDDMfCnB8InwBygnl Bexle663z+PdXe3gSjqIR69Q3nJzqUeTuXKkxDSHq1088HPPw53SGvA4A2mEbgO/bZ7W LsrhATVVraY6MpPwqI78QVt16blMozhZCmR6t7KHmBiNCF6ldWHr3mI7BGMRKCMN69+J XvUm4Yp8WMIKazadd1TQSvDR2uASKnMCPQ4yjVM7BPXoXFosP6B2VfToYGi6f+HPXzqQ tr6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7KoWR7YfSlxUuAc12Djnq3+XBSiuwpntiAuTt3ZYpok=; b=a4Vs1jZVQgdC7vx5Sw9aNSgvScjWEsZHCgPSGx7ap/n+2u251nMbv17W4nIqjBzPsB iM76tEK0W1iTibWz5Q+s7Ds0mFKXuPbAlRgQmW8DCXwjslgbz7loDEUJepeBgx0i9ZS3 NoFH70YcwzwWSPWSTA/Xu0vKSQqUGSrA1K0sHicrsaerbf9uUkDYzC2kFjmW28tWtul5 PwQtaTMBrkeKWPJ6edpiFvXZ19AA17ZJbj3cMFedY2nPMpGU1ntviHYQGw/Qt5UXlp80 3pijwh3w5rXayf+FywR1a9CQfnYBOrigSbQ964kR+wh/rEVw4sUnHqnuKAZQ5OSWs4iN ny+w== X-Gm-Message-State: AHYfb5jLKbpCRB9c5xvolrmZO1kQSeEYucMhJTVHSGS2U10HzOVl4om2 i1IxVRxQL2+Liqk5MGEXai8VqvOpZ1LK X-Received: by 10.36.172.16 with SMTP id s16mr1677899ite.118.1502805713592; Tue, 15 Aug 2017 07:01:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.92.19 with HTTP; Tue, 15 Aug 2017 07:01:53 -0700 (PDT) Received: by 10.2.92.19 with HTTP; Tue, 15 Aug 2017 07:01:53 -0700 (PDT) In-Reply-To: References: From: Gary Gregory Date: Tue, 15 Aug 2017 08:01:53 -0600 Message-ID: Subject: Re: [CSV] CSVMutableRecord To: Commons Users List Content-Type: multipart/alternative; boundary="94eb2c1fcd30b9aa860556cb385f" archived-at: Tue, 15 Aug 2017 14:01:58 -0000 --94eb2c1fcd30b9aa860556cb385f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable How does that work when you want to change more than one value? Gary On Aug 15, 2017 00:17, "Benedikt Ritter" wrote: > Hi, > > I very much like that CSVRecord is unmodifiable. So I=E2=80=99d suggest a= n API, > that creates a new record instead of mutating the existing one: > > CSVRecord newRecord =3D myRecord.put(1, =E2=80=9Evalue") > > I=E2=80=99m not sure about =E2=80=9Eput=E2=80=9C as a method name since i= t clashes with > java.util.Map#put, which is mutation based... > > Regards, > Benedikt > > > Am 15.08.2017 um 02:54 schrieb Gary Gregory : > > > > Feel free to provide a PR on GitHub :-) > > > > Gary > > > > On Aug 14, 2017 15:29, "Gary Gregory" wrote: > > > >> I think we've kept the design as YAGNI as possible... :-) > >> > >> Gary > >> > >> On Mon, Aug 14, 2017 at 3:25 PM, nitin mahendru < > >> nitin.mahendru88@gmail.com> wrote: > >> > >>> Yeah that also is OK. I though there is a reason to keep the CSVRecor= d > >>> without setters. But maybe not! > >>> > >>> Nitin > >>> > >>> > >>> > >>> > >>> On Mon, Aug 14, 2017 at 2:22 PM Gary Gregory > >>> wrote: > >>> > >>>> Hi All: > >>>> > >>>> Should we consider adding put(int,Object) and put(String, Object) to > the > >>>> current CSVRecord class? > >>>> > >>>> Gary > >>>> > >>>> On Mon, Aug 14, 2017 at 2:54 PM, nitin mahendru < > >>>> nitin.mahendru88@gmail.com> > >>>> wrote: > >>>> > >>>>> Hi Everyone, > >>>>> > >>>>> I recently pushed a change(pull request 20) to get the line ending > >>> from > >>>> the > >>>>> parser. > >>>>> > >>>>> Now I want to push another change which I feel will also be useful > for > >>>> the > >>>>> community. I want to add a CSVRecordMutable class which had a > >>> constructor > >>>>> which accepts a CSVRecord object. So when we have a CSVRecordMutabl= e > >>>> object > >>>>> from it then we can edit individual columns using it. > >>>>> > >>>>> I would be using this to write back my edited CSV file. My use case > >>> is to > >>>>> read a csv, mangle some columns, write back a new csv. > >>>>> > >>>>> I could have directly raised a pull request but I just wanted to > float > >>>> the > >>>>> idea before and see the reaction. > >>>>> > >>>>> Thanks > >>>>> > >>>>> Nitin > >>>>> > >>>> > >>> > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --94eb2c1fcd30b9aa860556cb385f--