• 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: NSDictionary key types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary key types


  • Subject: Re: NSDictionary key types
  • From: Jon Sigman <email@hidden>
  • Date: Thu, 6 Jan 2011 13:17:15 -0800 (PST)





________________________________
From: Nick Zitzmann <email@hidden>
To: Jon Sigman <email@hidden>
Cc: email@hidden
Sent: Thu, January 6, 2011 1:04:47 PM
Subject: Re: NSDictionary key types


On Jan 6, 2011, at 1:04 PM, Nick Zitzmann wrote:

>On Jan 6, 2011, at 2:03 PM, Jon Sigman wrote:

>> Is this what the documentation for "isEqual:" refers to when it says "If two
>>objects are equal, they must have the same hash value"? How do I determine what
>>an object's hash value is?

>It's the value returned from the hash property declared by NSObject.

Okay, I'm thoroughly confused now. What exactly is this hash value? The
documentation just says its "an integer that can be used as a table address in a
hash table structure." That doesn't mean much to me.


Do the following two objects have the same hash value, and if so, why do thay?
How is it assigned?
id myStr1 = @"8760";
id myStr2 = @"8760";



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSDictionary key types
      • From: "Stephen J. Butler" <email@hidden>
    • Re: NSDictionary key types
      • From: David Duncan <email@hidden>
    • Re: NSDictionary key types
      • From: Nick Zitzmann <email@hidden>
References: 
 >NSDictionary key types (From: Jon Sigman <email@hidden>)
 >Re: NSDictionary key types (From: Nick Zitzmann <email@hidden>)
 >Re: NSDictionary key types (From: Jon Sigman <email@hidden>)
 >Re: NSDictionary key types (From: Nick Zitzmann <email@hidden>)
 >Re: NSDictionary key types (From: Jon Sigman <email@hidden>)
 >Re: NSDictionary key types (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Context in GCD source cancel handler?
  • Next by Date: Re: NSDictionary key types
  • Previous by thread: Re: NSDictionary key types
  • Next by thread: Re: NSDictionary key types
  • Index(es):
    • Date
    • Thread