iOS中第三方有序字典框架——M13OrderedDictionary(二)

简介: iOS中第三方有序字典框架——M13OrderedDictionary

三、M13MutableOrderedDictionary


       基于M13OrderedDictionary,M13MutableOrderedDictionary为可变的有序字典类,其中方法解析如下:


//类创建方法

+ (instancetype)orderedDictionaryWithCapacity:(NSUInteger)numEntries;

//初始化方法

- (id)initWithCapacity:(NSUInteger)numEntries;

//添加键值对的方法

- (void)addObject:(M13GenericType(ObjectType, id))object pairedWithKey:(M13GenericType(KeyType, id<NSCopying>))key;

- (void)addEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry;

- (void)addEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)orderedDictionary;

- (void)addEntriesFromDictionary:(NSDictionary M13Generics(KeyType, ObjectType) *)dictionary;

//插入键值对的方法

- (void)insertObject:(M13GenericType(ObjectType, id))object pairedWithKey:(M13GenericType(KeyType, id<NSCopying>))key atIndex:(NSUInteger)index;

- (void)insertEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry atIndex:(NSUInteger)index;

- (void)insertEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)orderedDictionary atIndex:(NSUInteger)index;

- (void)insertEntriesFromDictionary:(NSDictionary M13Generics(KeyType, ObjectType) *)dictionary atIndex:(NSUInteger)index;

//设置键值对的方法

- (void)setObject:(M13GenericType(ObjectType, id))object forKey:(M13GenericType(KeyType, id<NSCopying>))aKey;

- (void)setEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry;

- (void)setEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)orderedDictionary;

- (void)setEntriesFromDictionary:(NSDictionary M13Generics(KeyType, ObjectType) *)dictionary;

- (void)setObject:(M13GenericType(ObjectType, id))object forKey:(M13GenericType(KeyType, id<NSCopying>))aKey atIndex:(NSUInteger)index;

- (void)setEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry atIndex:(NSUInteger)index;

- (void)setEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)orderedDictionary atIndex:(NSUInteger)index;

- (void)setEntriesFromDictionary:(NSDictionary M13Generics(KeyType, ObjectType) *)dictionary atIndex:(NSUInteger)index;

//移除键值对的方法

- (void)removeObjectForKey:(M13GenericType(KeyType, id<NSCopying>))key;

- (void)removeObjectsForKeys:(NSArray M13Generics(KeyType) *)keys;

- (void)removeAllObjects;

- (void)removeAllEntries;

- (void)removeLastEntry;

- (void)removeEntryWithObject:(M13GenericType(ObjectType, id))object;

- (void)removeEntryWithKey:(M13GenericType(KeyType, id<NSCopying>))key;

- (void)removeEntryWithObject:(M13GenericType(ObjectType, id))object pairedWithKey:(M13GenericType(KeyType, id<NSCopying>))key;

- (void)removeEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry;

- (void)removeEntryWithObject:(M13GenericType(ObjectType, id))object inRange:(NSRange)range;

- (void)removeEntryWithKey:(M13GenericType(KeyType, id<NSCopying>))key inRange:(NSRange)range;

- (void)removeEntryWithObject:(M13GenericType(ObjectType, id))object pairedWithKey:(M13GenericType(KeyType, id<NSCopying>))key inRange:(NSRange)ramge;

- (void)removeEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry inRange:(NSRange)range;

- (void)removeEntryAtIndex:(NSUInteger)index;

- (void)removeEntriesAtIndices:(NSIndexSet *)indices;

- (void)removeEntryWithObjectIdenticalTo:(M13GenericType(ObjectType, id))anObject;

- (void)removeEntryWithObjectIdenticalTo:(M13GenericType(ObjectType, id))anObject inRange:(NSRange)range;

- (void)removeEntriesWithObjectsInArray:(NSArray M13Generics(ObjectType) *)array;

- (void)removeEntriesWithKeysInArray:(NSArray M13Generics(KeyType) *)array;

- (void)removeEntriesInRange:(NSRange)range;

//替换键值对的方法

- (void)replaceEntryAtIndex:(NSInteger)index withObject:(M13GenericType(ObjectType, id))object pairedWithKey:(M13GenericType(KeyType, id<NSCopying>))key;

- (void)replaceEntryAtIndex:(NSUInteger)index withEntry:(NSDictionary M13Generics(KeyType, ObjectType) *)entry;

- (void)replaceEntriesAtIndices:(NSIndexSet *)indices

                   withObjects:(NSArray M13Generics(ObjectType) *)objects

                pairedWithKeys:(NSArray M13Generics(KeyType) *)keys;

- (void)replaceEntriesAtIndices:(NSIndexSet *)indices

                   withEntries:(NSArray M13Generics(NSDictionary<KeyType, ObjectType> *) *)orderedEntries;

- (void)replaceEntriesAtIndices:(NSIndexSet *)indices

withEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)orderedDictionary;

- (void)replaceEntriesInRange:(NSRange)range

        withObjectsFromArray:(NSArray M13Generics(ObjectType) *)objects

     pairedWithKeysFromArray:(NSArray M13Generics(KeyType) *)keys

                     inRange:(NSRange)range2;

- (void)replaceEntriesInRange:(NSRange)range

             withEntriesFrom:(NSArray M13Generics(NSDictionary<KeyType, ObjectType> *) *)orderedEntries

                     inRange:(NSRange)range2;

- (void)replaceEntriesInRange:(NSRange)range

withEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)dictionary

                     inRange:(NSRange)range2;

- (void)replaceEntriesInRange:(NSRange)range

        withObjectsFromArray:(NSArray M13Generics(ObjectType) *)objects

     pairedWithKeysFromArray:(NSArray M13Generics(KeyType) *)keys;

- (void)replaceEntriesInRange:(NSRange)range

             withEntriesFrom:(NSArray M13Generics(NSDictionary<KeyType, ObjectType> *) *)orderedEntries;

- (void)replaceEntriesInRange:(NSRange)range

withEntriesFromOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)dictionary;

- (void)setEntriesToObjects:(NSArray M13Generics(ObjectType) *)objects pairedWithKeys:(NSArray M13Generics(KeyType) *)keys;

- (void)setEntriesToOrderedDictionary:(M13OrderedDictionary M13Generics(KeyType, ObjectType) *)orderedDictionary;

//进行元素筛选

- (void)filterEntriesUsingPredicateForObjects:(NSPredicate *)predicate;

//进行元素交换

- (void)exchangeEntryAtIndex:(NSUInteger)idx1 withEntryAtIndex:(NSUInteger)idx2;

//进行元素排序

- (void)sortEntriesByObjectUsingDescriptors:(NSArray *)descriptors;

- (void)sortEntriesByKeysUsingDescriptors:(NSArray *)descriptors;

- (void)sortEntriesByObjectUsingComparator:(NSComparator)cmptr;

- (void)sortEntriesByKeysUsingComparator:(NSComparator)cmptr;

- (void)sortEntriesByObjectWithOptions:(NSSortOptions)opts usingComparator:(NSComparator)cmptr;

- (void)sortEntriesByKeysWithOptions:(NSSortOptions)opts usingComparator:(NSComparator)cmptr;

- (void)sortEntriesByObjectUsingFunction:(NSInteger (*)(M13GenericType(ObjectType, id),

                                                       M13GenericType(ObjectType, id),

                                                       void * M13__NULLABLE))compare

                                context:(M13_NULLABLE void *)context;

- (void)sortEntriesByKeysUsingFunction:(NSInteger (*)(M13GenericType(KeyType, id<NSCopying>),

                                                     M13GenericType(KeyType, id<NSCopying>),

                                                     void * M13__NULLABLE))compare

                              context:(M13_NULLABLE void *)context;

- (void)sortEntriesByObjectUsingSelector:(SEL)comparator;

- (void)sortEntriesByKeysUsingSelector:(SEL)comparator;

目录
相关文章
|
搜索推荐 数据管理 定位技术
iOS应用开发中有多种主流框架
iOS应用开发中有多种主流框架
858 60
|
移动开发 网络协议 小程序
基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v10.0版已发布
RainbowChat是一套基于开源IM即时通讯聊天框架 MobileIMSDK 的产品级移动端IM系统。RainbowChat源于真实运营的产品,解决了大量的屏幕适配、细节优化、机器兼容问题。RainbowChat可能是市面上提供im即时通讯聊天源码的,唯一一款同时支持TCP、UDP两种通信协议的IM产品。与姊妹产品RainbowTalk和RainbowChat-Web 技术同源,历经考验。
699 0
基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v10.0版已发布
|
安全 数据安全/隐私保护 Android开发
【05】2025年1月首发完整版-篇幅较长-苹果app如何上架到app store完整流程·不借助第三方上架工具的情况下无需花钱但需仔细学习-优雅草央千澈详解关于APP签名以及分发-们最关心的一篇来了-IOS上架app
【05】2025年1月首发完整版-篇幅较长-苹果app如何上架到app store完整流程·不借助第三方上架工具的情况下无需花钱但需仔细学习-优雅草央千澈详解关于APP签名以及分发-们最关心的一篇来了-IOS上架app
3217 75
|
iOS开发 开发者 MacOS
深入探索iOS开发中的SwiftUI框架
【10月更文挑战第21天】 本文将带领读者深入了解Apple最新推出的SwiftUI框架,这一革命性的用户界面构建工具为iOS开发者提供了一种声明式、高效且直观的方式来创建复杂的用户界面。通过分析SwiftUI的核心概念、主要特性以及在实际项目中的应用示例,我们将展示如何利用SwiftUI简化UI代码,提高开发效率,并保持应用程序的高性能和响应性。无论你是iOS开发的新手还是有经验的开发者,本文都将为你提供宝贵的见解和实用的指导。
466 66
|
iOS开发 开发者
探索iOS开发中的SwiftUI框架
【10月更文挑战第39天】在苹果的生态系统中,SwiftUI框架以其声明式语法和易用性成为开发者的新宠。本文将深入SwiftUI的核心概念,通过实际案例展示如何利用这一框架快速构建用户界面,并探讨其对iOS应用开发流程的影响。
260 1
|
移动开发 网络协议 小程序
基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v9.1版已发布
RainbowChat是一套基于开源IM聊天框架 MobileIMSDK 的产品级移动端IM系统。RainbowChat源于真实运营的产品,解决了大量的屏幕适配、细节优化、机器兼容问题
481 5
|
Swift iOS开发 开发者
探索iOS开发中的SwiftUI框架
【10月更文挑战第21天】在苹果生态系统中,SwiftUI的引入无疑为iOS应用开发带来了革命性的变化。本文将通过深入浅出的方式,带领读者了解SwiftUI的基本概念、核心优势以及如何在实际项目中运用这一框架。我们将从一个简单的例子开始,逐步深入到更复杂的应用场景,让初学者能够快速上手,同时也为有经验的开发者提供一些深度使用的技巧和策略。
291 1
|
前端开发 iOS开发 开发者
探索iOS开发中的SwiftUI框架
【9月更文挑战第21天】在iOS应用开发的广阔天地中,SwiftUI框架如一股清新之风,为开发者带来了声明式语法的便捷与高效。本文将深入探讨SwiftUI的核心概念、布局方式及数据绑定机制,同时通过实例演示如何运用SwiftUI构建用户界面,旨在引领读者领略SwiftUI的魅力,并激发其对iOS开发新趋势的思考与实践。
193 6
|
iOS开发 开发者 UED
探索iOS应用开发中的SwiftUI框架
【9月更文挑战第26天】 在iOS开发的海洋中,SwiftUI犹如一艘现代的快艇,引领着开发者们驶向更加高效与直观的编程体验。本文将带你领略SwiftUI的魅力,从其设计理念到实际应用,我们将一步步揭开它如何简化界面构建过程的面纱。通过对比传统方式,你将看到SwiftUI如何让代码变得像诗一样优美,同时保持强大的功能性和灵活性。准备好让你的iOS开发技能加速升级,一起驾驭这股新潮流吧!
216 1
|
开发框架 Dart Android开发
安卓与iOS的跨平台开发:Flutter框架深度解析
在移动应用开发的海洋中,Flutter作为一艘灵活的帆船,正引领着开发者们驶向跨平台开发的新纪元。本文将揭开Flutter神秘的面纱,从其架构到核心特性,再到实际应用案例,我们将一同探索这个由谷歌打造的开源UI工具包如何让安卓与iOS应用开发变得更加高效而统一。你将看到,借助Flutter,打造精美、高性能的应用不再是难题,而是变成了一场创造性的旅程。