Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Did the sort do anything? Date: Mon, 07 Nov 2011 21:03:50 -0500 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <4d8fb7l8qb1g820cphr4fh447a9uitlddj@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 8 Nov 2011 02:03:55 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="HSlJAUb3pGXi3i7ZL/HoAw"; logging-data="21035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZdhFrhvuWzsvvFLewKA31" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: Cancel-Lock: sha1:ba99lnQr4oZtPcdHKZ6S7yF+R6I= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9760 On 11/7/2011 9:30 AM, Joshua Cranmer wrote: > On 11/7/2011 6:11 AM, Eric Sosman wrote: >> Post-sort order check won't do: The sort might have interchanged >> two different objects with equal keys. > > If we're talking about Java's built-in sort methods, they are stable. Um. Er. Yes, good point. (Well, the Arrays.sort() methods for primitives have no stability guarantees -- but with primitives you couldn't tell anyhow, so ...) -- Eric Sosman esosman@ieee-dot-org.invalid