Article View: borland.public.jbuilder.java.language
Article #15238Re: Sorting File[] in Alphabetical Order
From: Rich Wilkman
Date: Fri, 25 Jun 1999 00:00
Date: Fri, 25 Jun 1999 00:00
110 lines
4186 bytes
4186 bytes
Jonathan: State the problem, I guess. What are the parameters for the problem? Int'l order needed? Is it really File[]? Personally, I'd cheat. Determine the OS and exec a shell command that gives me an ordered listing of the files. I could do that for Wintel and for *nix systems; that wouldn't work on the mac. Never re-invent the wheel <g>. -Rich Jonathan wrote: > > How would you solve this problem? > > Rich Wilkman wrote in message <377260AB.3E786F93@inprise.com>... > >Jonathan: > > > >I was just curious; good cross-language sorts are one of those "academic > >interest" things for me. I think Tor has a good track on this one for > >you, though. Sorting itself winds down to choosing the algorithm > >appropriate for the set of items (size, etc.) in question. Binary trees > >or divide-and-conquer algorithms are good, but probably not appropriate > >for a set of 10 items, for example. Linear (O)n pass mechanism on a > >million items would be just as wrong. I was curious to see / hear how > >you had solved this particular problem. > > > >-Rich > > > >Jonathan wrote: > >> > >> good point, I also found it very slow, > >> > >> How does Windows explorer sort so fast, > >> > >> Do you have any suggestions, > >> > >> help appreciated > >> > >> Jonathan > >> > >> Rich Wilkman wrote in message <3770FF2A.E30D62D7@inprise.com>... > >> >Jonathan: > >> > > >> >Is your solution good for more then English character ordering? > >> > > >> >-Rich > >> > > >> >Jonathan wrote: > >> >> > >> >> Don't worry I figured this one out > >> >> > >> >> Arrays.sort(<object[]>) > >> >> Jonathan wrote in message <7kqbl0$9h78@forums.borland.com>... > >> >> >Does anyone know of a quick way of sorting File[] into Alphabetical > >> order > >> >> > > >> >> >any help appreciated > >> >> > > >> >> > > >> >> >Jonathan > >> >> > > >> >> > > >> > > >> >-- > >> > > >> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > >> >Rich Wilkman > >> >Senior Quality Assurance Engineer > >> >Borland JBuilder Team > >> > > >> >If you see something that looks like an opinion up there, > >> >it's mine and mine alone. > >> > > >> >Mail sent to me from the newsgroups won't bounce but will > >> >be ignored. If I have time, I'll respond, but you have > >> >a better chance if you confine your posts to the newsgroups > >> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > > >-- > > > >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > >Rich Wilkman > >Senior Quality Assurance Engineer > >Borland JBuilder Team > > > >If you see something that looks like an opinion up there, > >it's mine and mine alone. > > > >Mail sent to me from the newsgroups won't bounce but will > >be ignored. If I have time, I'll respond, but you have > >a better chance if you confine your posts to the newsgroups > >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<3773A32E.649ED14@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7kqbl0$9h78@forums.borland.com> <7kqh48$a242@forums.borland.com> <3770FF2A.E30D62D7@inprise.com> <7kso7p$c276@forums.borland.com> <377260AB.3E786F93@inprise.com> <7kvddo$eei15@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9f550f2ec47eab87 X-Google-Attributes: gidf74b3,public From: Rich Wilkman <rwilkman@inprise.com> Subject: Re: Sorting File[] in Alphabetical Order Date: 1999/06/25 Message-ID: <3773A32E.649ED14@inprise.com> X-Deja-AN: 493808109 Content-Transfer-Encoding: 7bit References: <7kqbl0$9h78@forums.borland.com> <7kqh48$a242@forums.borland.com> <3770FF2A.E30D62D7@inprise.com> <7kso7p$c276@forums.borland.com> <377260AB.3E786F93@inprise.com> <7kvddo$eei15@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language