• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sort Algorithm Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort Algorithm Question


  • Subject: Re: Sort Algorithm Question
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 23 Feb 2005 12:50:46 -0800


On Feb 23, 2005, at 12:31 PM, James Cicenia wrote:

If one needs to have more than one comparison does one need to subclass the main class for each compareTo ??

I can't understand what you mean.


Believe it or not I have never used these before... and I don't quite understand the difference or benefit between the
generic Java vs. NSComparator.


NSArray works with NSComparator. The API is slightly different. Both work.


Chuck



On Feb 23, 2005, at 1:03 PM, Chuck Hill wrote:

You want this as part of a fetch? I think you will need to work with DB specific collation sequences.
You want to do this in-memory? com.webobjects.foundation.NSComparator is your friend!


Chuck


On Feb 23, 2005, at 10:58 AM, James Cicenia wrote:

Hello -

I would like to do a sort with a primary and secondary sort both ascending, HOWEVER,
I want the primary sort which is comprised of dates to have the nulls sorted towards the bottom.


Here is an example

AAAA	Date 1
AAAA	Date 2
BBBB	Date 1
BBBB        ----------
CCCC	Date 3
CCCC	Date 4
CCCC       ---------

Any thoughts on the most efficient means to do this?

- James Cicenia

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects






--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Sort Algorithm Question (From: James Cicenia <email@hidden>)
 >Re: Sort Algorithm Question (From: Chuck Hill <email@hidden>)
 >Re: Sort Algorithm Question (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Sort Algorithm Question
  • Next by Date: Re: Sort Algorithm Question
  • Previous by thread: Re: Sort Algorithm Question
  • Next by thread: Re: Sort Algorithm Question
  • Index(es):
    • Date
    • Thread