Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.java.programmer Subject: Re: Did the sort do anything? Followup-To: comp.lang.java.programmer Date: Mon, 16 May 2011 14:32:02 +1200 Organization: Geek Central Lines: 15 Message-ID: References: <9303hcFq0nU1@mid.individual.net> NNTP-Posting-Host: 118-92-95-178.dsl.dyn.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: lust.ihug.co.nz 1305513122 20022 118.92.95.178 (16 May 2011 02:32:02 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Mon, 16 May 2011 02:32:02 +0000 (UTC) User-Agent: KNode/4.4.7 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4139 In message , Roedy Green wrote: > In all my years, I had never noticed that stability is irrelevant for > primitives. It’s only irrelevant for types where the key is the entire value. If you were sorting integers based on, say, the units digit, then stability would most certainly become relevant, even thought integers are a “primitive” type in Java. If, on the other hand, you were sorting immutable objects of a Java “reference” type where the key was the entire object state, then stability would indeed be irrelevant, notwithstanding such types are not considered “primitive”.