• 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
Casting to a superclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Casting to a superclass


  • Subject: Casting to a superclass
  • From: Rob Rix <email@hidden>
  • Date: Mon, 16 Jul 2001 10:50:46 -0400

Hello, all.

I'm writing a utility class, which will have an NSMutableSet as an ivar. I want users of the class to be able to access the set, but as an immutable object.
So, can I typecast the NSMutableSet to NSSet, or should I just return [NSSet setWithSet:someSet];?

Thanks,

-- Rob

Flying is not difficult. Surviving the (crash) landing is difficult.


  • Follow-Ups:
    • Re: Casting to a superclass
      • From: Rob Rix <email@hidden>
    • Re: Casting to a superclass
      • From: Raphael Sebbe <email@hidden>
  • Prev by Date: Re: NSPipe
  • Next by Date: Re: Casting to a superclass
  • Previous by thread: printing a table
  • Next by thread: Re: Casting to a superclass
  • Index(es):
    • Date
    • Thread