Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 15 May 2011 21:50:53 -0500 Date: Sun, 15 May 2011 19:50:49 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Did the sort do anything? References: <9303hcFq0nU1@mid.individual.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 17 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.8.126.96 X-Trace: sv3-51g8SCN5/dNKZZ/MTYqLDFQjtd13jYLW9zuKTUX8y3kV57Ech2rhJ/Osv+zCxl8cjKrjBICm0ZqlANl!jvL5NeuM0VhNUoyLRpJjugq/IVfW4ExkRvnxoaeOm4ewLalk7zi58qFh5NGIKLceTootAi4fztUN!KyEFc0T4pIodqP2JuDwZstEu9Fo6aetzAiv1t+upTzQ= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1986 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4142 On 5/15/2011 7:32 PM, Lawrence D'Oliveiro wrote: ... > 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”. Do you consider the result of System.identityHashCode(x) to be part of the state of the object referenced by x? If you do, then keys that are the entire state will be rare. If not, then two immutable objects that are otherwise equal state may belong to different buckets in a java.util.IdentityHashMap, so their order in an array could be relevant. Patricia