RE: Union of two Arrays
RE: Union of two Arrays
- Subject: RE: Union of two Arrays
- From: Andrew Lindesay <email@hidden>
- Date: Thu, 8 Mar 2007 09:22:32 +1300
Is there an easy (WO or plain Java) way to derive the union of two
NSArrays?
If you mean as in a set then you should use NSSet...
((new NSSet(arrayOne)).setByUnioningSet(new NSSet
(arrayTwo))).allObjects()
...but if you mean actually a concatenation then...
arrayOne.arrayByAddingObjectsFromArray(arrayTwo)
cheers.
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
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