Re: [CSV] CSVMutableRecord

2017-08-25 Thread Gary Gregory
On Fri, Aug 25, 2017 at 11:08 AM, nitin mahendru wrote: > Hi Everyone, > > Any decision on this yet ? > Not yet. Needs a bit more stewing and brewing... Gary > Thanks > > Nitin > > > > > On Mon, Aug 21, 2017 at 2:51 PM nitin mahendru

Re: [CSV] CSVMutableRecord

2017-08-25 Thread nitin mahendru
Hi Everyone, Any decision on this yet ? Thanks Nitin On Mon, Aug 21, 2017 at 2:51 PM nitin mahendru wrote: > Just another follow up. Anything new ? > > -Nitin > > > > > On Thu, Aug 17, 2017 at 10:58 AM Gary Gregory > wrote: > >> Not yet

Re: [CSV] CSVMutableRecord

2017-08-21 Thread nitin mahendru
Just another follow up. Anything new ? -Nitin On Thu, Aug 17, 2017 at 10:58 AM Gary Gregory wrote: > Not yet ;-) > > On Aug 17, 2017 11:34, "nitin mahendru" > wrote: > > > Hi All, > > > > Any consensus on this ? > > > > -Nitin > > > > > >

Re: [CSV] CSVMutableRecord

2017-08-17 Thread Gary Gregory
Not yet ;-) On Aug 17, 2017 11:34, "nitin mahendru" wrote: > Hi All, > > Any consensus on this ? > > -Nitin > > > > > On Tue, Aug 15, 2017 at 4:43 PM Gary Gregory > wrote: > > > On Tue, Aug 15, 2017 at 5:32 PM, Gilles

Re: [CSV] CSVMutableRecord

2017-08-17 Thread nitin mahendru
Hi All, Any consensus on this ? -Nitin On Tue, Aug 15, 2017 at 4:43 PM Gary Gregory wrote: > On Tue, Aug 15, 2017 at 5:32 PM, Gilles > wrote: > > > On Tue, 15 Aug 2017 22:52:32 +, nitin mahendru wrote: > > > >> On Tue, 15 Aug 2017

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Gilles
On Tue, 15 Aug 2017 12:02:20 -0600, Gary Gregory wrote: On Tue, Aug 15, 2017 at 10:38 AM, nitin mahendru

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Gary Gregory
On Tue, Aug 15, 2017 at 10:38 AM, nitin mahendru wrote: > How about having a state in the class itself which says that it's mutable > or not. > If we call a setter on an immutable then it throws an exception. > By default the records are immutable and you need to

Re: [CSV] CSVMutableRecord

2017-08-15 Thread nitin mahendru
How about having a state in the class itself which says that it's mutable or not. If we call a setter on an immutable then it throws an exception. By default the records are immutable and you need to make them mutable using a new API. pros: Saves memory, Keeps the immutability benefits cons:

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Gilles
On Tue, 15 Aug 2017 09:49:04 -0600, Gary Gregory wrote: That looks odd to me. What comes up for me is the use case where I want to ETL a file of 10,000,000 records and update, say, one column. If am forced to create a brand new record for every record read, that would be a shame. Why? If I

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Gary Gregory
That looks odd to me. What comes up for me is the use case where I want to ETL a file of 10,000,000 records and update, say, one column. If am forced to create a brand new record for every record read, that would be a shame. If I had a mutable record, I could just keep on updating it and using it

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Gilles
On Tue, 15 Aug 2017 08:01:53 -0600, Gary Gregory wrote: How does that work when you want to change more than one value? How about a "vararg" argument: /** * @param orig Original to be copied. * @param replace Fields to be replaced. */ public static CSVRecord createRecord(CSVRecord orig,

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Gary Gregory
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’d suggest an API, > that creates a new record instead of mutating the existing one: > >

Re: [CSV] CSVMutableRecord

2017-08-15 Thread Benedikt Ritter
Hi, I very much like that CSVRecord is unmodifiable. So I’d suggest an API, that creates a new record instead of mutating the existing one: CSVRecord newRecord = myRecord.put(1, „value") I’m not sure about „put“ as a method name since it clashes with java.util.Map#put, which is mutation

Re: [CSV] CSVMutableRecord

2017-08-14 Thread 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.mahendr...@gmail.com> wrote: > >> Yeah that also

Re: [CSV] CSVMutableRecord

2017-08-14 Thread Gary Gregory
I think we've kept the design as YAGNI as possible... :-) Gary On Mon, Aug 14, 2017 at 3:25 PM, nitin mahendru wrote: > Yeah that also is OK. I though there is a reason to keep the CSVRecord > without setters. But maybe not! > > Nitin > > > > > On Mon, Aug 14, 2017

Re: [CSV] CSVMutableRecord

2017-08-14 Thread nitin mahendru
Yeah that also is OK. I though there is a reason to keep the CSVRecord 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

Re: [CSV] CSVMutableRecord

2017-08-14 Thread Gary Gregory
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 wrote: > Hi Everyone, > > I recently pushed a change(pull request 20) to get the line ending from the >