commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1559905 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/CSVRecord.java test/java/org/apache/commons/csv/CSVRecordTest.java
Date Tue, 21 Jan 2014 12:49:03 GMT
On Tue, Jan 21, 2014 at 6:44 AM, Adrian Crum <
adrian.crum@sandglass-software.com> wrote:

> I must be confused. If the goal was to give CSVRecord a Map interface,
> then that would include the interface's put method.
>

I recall getting some pushback on making record implement
Map<String,String>. The ugly part is that a 'non-headered' record would
have to give reasonable values for all of the Map API. With toMap() that's
just one API.


> If we don't support the Map interface, then what is the point of this
> change?


My original use case: I have duplicate implementations in my app to take a
record and to take a Map, not OO. If I have toMap() OR record implements
Map<String,String>, then all I need is my Map based impl and I can drop my
record based impl.

Gary


>
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 1/21/2014 6:36 AM, Emmanuel Bourg wrote:
>
>> Le 21/01/2014 12:20, Adrian Crum a écrit :
>>
>>> This looks really ugly. How do I update the CSVRecord using Map.put()?
>>>
>>
>> Shouldn't the record be read only? As the result of a parsing it's not
>> intended to be modified.
>>
>> Emmanuel Bourg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message