Re: Comparing arrays

2007-06-11 Thread Michelle Parker
Hi all Thanks for all the suggestions. Hope you're having a great time at WWDC! Wish I was there, but I'm working on Parker v3 :-) The solutions I ended up using was to use rawRowsMatchingKeyAndValue which returns Integers instead of Longs. Chuck, that's an interesting idea to control th

Re: Comparing arrays

2007-06-11 Thread Chuck Hill
On Jun 10, 2007, at 10:34 PM, Michelle Parker wrote: Hi all I have a slight problem which I am looking for the most efficient solution: I am comparing 2 NSArrays containing numbers, with the aim of removing the numbers in one array from the other array. The first array is obtained by r

Re: Comparing arrays

2007-06-11 Thread Frederic JECKER
Woops, Nevermind, removeAll isn't comparator based so this won't work Sorry Fred Frederic JECKER a écrit : Another way would be to create a custom java.util.Comparator to compare Integer to Long objects to avoid conversion. Once done, just create two java.util.TreeSet (one for each array) and

Re: Comparing arrays

2007-06-11 Thread Frederic JECKER
Another way would be to create a custom java.util.Comparator to compare Integer to Long objects to avoid conversion. Once done, just create two java.util.TreeSet (one for each array) and populate them with the addAll() function. Then the removeAll() function should do the job Regards FJ Galen

Re: Comparing arrays

2007-06-11 Thread Galen Rhodes
You could try mass conversion of the arrays to strings like so: NSArray arStr = NSArray.componentsSeparatedByString (arLong.componentsJoinedByString("|"), "|"); I think that'll work. -- Galen Rhodes [EMAIL PROTECTED] "There is no worse tyranny than to force a man to pay for what he does no

Re: Comparing arrays

2007-06-11 Thread Q
On 11/06/2007, at 3:34 PM, Michelle Parker wrote: Hi all I have a slight problem which I am looking for the most efficient solution: I am comparing 2 NSArrays containing numbers, with the aim of removing the numbers in one array from the other array. The first array is obtained by rawR

Re: Comparing arrays

2007-06-11 Thread Jerry W. Walker
Hi, Michelle, On Jun 11, 2007, at 3:39 AM, Daniele Corti wrote: 2007/6/11, Michelle Parker <[EMAIL PROTECTED]>: Hi all I have a slight problem which I am looking for the most efficient solution: I am comparing 2 NSArrays containing numbers, with the aim of removing the numbers in one array f

Re: Comparing arrays

2007-06-11 Thread Daniele Corti
2007/6/11, Michelle Parker <[EMAIL PROTECTED]>: Hi all I have a slight problem which I am looking for the most efficient solution: I am comparing 2 NSArrays containing numbers, with the aim of removing the numbers in one array from the other array. The first array is obtained by rawRowsForSQL

Comparing arrays

2007-06-10 Thread Michelle Parker
Hi all I have a slight problem which I am looking for the most efficient solution: I am comparing 2 NSArrays containing numbers, with the aim of removing the numbers in one array from the other array. The first array is obtained by rawRowsForSQL which returns the numbers as Longs. The s