• 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: Union of two Arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Union of two Arrays
  • Next by Date: Re: Union of two Arrays
  • Previous by thread: Re: Intersection (was Union) of two Arrays SOLVED
  • Next by thread: WebObjects 5.3.3 DST and Linux
  • Index(es):
    • Date
    • Thread