On Tue, Jan 21, 2014 at 7:49 AM, Gary Gregory <garydgreg...@gmail.com>wrote:

> On Tue, Jan 21, 2014 at 6:44 AM, Adrian Crum <
> adrian.c...@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.
>

I should have said that my code is read-only for records. Clearly a special
case.

Gary


>
> 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-unsubscr...@commons.apache.org
>>> For additional commands, e-mail: dev-h...@commons.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@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
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@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

Reply via email to