iOS Note nsset

Source: Internet
Author: User

First, Introduction

Nsset exactly what type, in fact it and nsarray functional nature, for storing objects, belong to the collection; Nsset, Nsmutableset class declares programming interface objects, unordered collections, which are stored in memory in a discontinuous way, Unlike Nsarray (an ordered set) class declares that the programming interface object is an ordered collection, where the memory location is contiguous;

Nsset and our Common Nsarry difference is: In the search for an element nsset more efficient than nsarray, mainly because it uses a hash (hash, also can be translated as a hash) algorithm.

Nsset and Nsarray are classes, only cocoa objects can be added, and if you need to include basic data types (int,float,bool,double, etc.), you need to encapsulate the data into a nsnumber type.

Ii. Summary of common methods of Nsset

Iii. Summary of common methods of Nsmutableset

iOS Note nsset

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.