Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Mike Schilling" Newsgroups: comp.lang.java.programmer Subject: Re: Binary Search Date: Sat, 2 Apr 2011 08:58:55 -0700 Organization: A noiseless patient Spider Lines: 5 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 8bit Injection-Date: Sat, 2 Apr 2011 15:58:27 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="nPgGKe3051Y3NHz75zStxg"; logging-data="11135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19amb01P0LxlHGHm+g2oEdHCJjZAvX43tg=" X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 In-Reply-To: X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416 Importance: Normal Cancel-Lock: sha1:6Hw4HsH3Tlloioau7qbTMQDy29Q= X-Priority: 3 X-MSMail-Priority: Normal Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2763 "Lew" wrote in message news:in7eb0$ug9$1@news.albasani.net... > Mike Schilling wrote: >> "Lawrence D'Oliveiro" wrote: >>> So why isn’t there a single-argument overload of the put method to save >>> you >>> the trouble? >> >> There is, if you use a Set instead of a Map. Which, for sorting, works >> equally >> well. > > In the standard API, HashSet is implemented as a Map under the > hood, as is TreeSet. "Lawrence" could spend its time profitably by > studying the Javadocs. To be fair, it wasn't Lawrence who said that Maps don't work with embedded keys.