Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer Subject: Re: Something Better than ArrayList Date: Tue, 21 Jun 2011 16:39:28 -0700 Organization: A noiseless patient Spider Lines: 20 Message-ID: <0qa20751kl7amfup6elpji0fbsaove7mdl@4ax.com> References: <1337fe1a-2385-47c1-b966-9925f79d0ba3@j28g2000vbp.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="11161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194npNgQqFhOV38DvEYCQwaIWxeHNpYoxk=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:sCu4PQQHy1vR3LwrPDat29WYVjo= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5502 On Tue, 21 Jun 2011 22:56:51 +0100, Tom Anderson wrote: [snip] >You can't do it with a normal Map. You can do it with a ConcurrentMap: > >http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html > >ConcurrentMap has it because you can't easily build an efficient >threadsafe implementation of putIfAbsent on top of the normal Map >interface. It's a bit of a shame Map doesn't have it, because it's useful >even if you're not dealing with multiple threads! Thank you for that bit. I did not know if I was reading right or missing something. Sincerely, Gene Wirchenko