ios - Availability of bidictionary structure? -


i'm facing case in application need bidirectional dictionary data structure, means kind of nsdictionary can retrieve key value , value key (all values , keys unique).

is there such kind of data structure in c / objectivec ?

you can nsdictionary:

allkeysforobject: returns new array containing keys corresponding occurrences of given object in dictionary.

  • (nsarray *)allkeysforobject:(id)anobject parameters anobject value in dictionary. return value new array containing keys corresponding occurrences of anobject in dictionary. if no object matching anobject found, returns empty array.

discussion each object in dictionary sent isequal: message determine if it’s equal anobject.

and:

objectforkey: returns value associated given key.

  • (id)objectforkey:(id)akey parameters akey key return corresponding value. return value value associated akey, or nil if no value associated akey.

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -