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;

目录
相关文章
|
1月前
|
算法 计算机视觉 iOS开发
iOS 实时图像处理技术:Core Image 框架的应用
【4月更文挑战第8天】 在移动设备上实现高效的图像处理功能,对于提升用户体验和扩展应用程序能力至关重要。苹果公司的iOS平台提供了强大的Core Image框架,它允许开发者以高效和直观的方式执行复杂的图像处理任务。本文将深入探讨Core Image框架的关键特性,并通过实例演示如何在iOS应用中集成实时图像处理功能,不仅提高性能,同时保持了电池寿命的优化。我们将重点讨论面部识别、滤镜应用和性能优化等关键技术点,为读者提供一份全面的iOS图像处理指南。
|
4月前
|
机器学习/深度学习 PyTorch TensorFlow
是否有其他框架可以在iOS设备上进行机器学习?
是否有其他框架可以在iOS设备上进行机器学习?
21 1
|
4月前
|
存储 数据建模 iOS开发
iOS设备功能和框架: 什么是 Core Data,它在 iOS 中的作用是什么?
iOS设备功能和框架: 什么是 Core Data,它在 iOS 中的作用是什么?
34 1
|
4月前
|
定位技术 iOS开发
iOS设备功能和框架: 如何使用 Core Location 获取设备的位置信息?
iOS设备功能和框架: 如何使用 Core Location 获取设备的位置信息?
20 0
|
1月前
|
移动开发 网络协议 小程序
基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v9.0版已发布
MobileIMSDK 是一套专门为移动端开发的开源IM即时通讯框架,超轻量级、高度提炼,一套API优雅支持 UDP 、TCP 、WebSocket 三种协议,支持 iOS、Android、H5、标准Java、小程序、Uniapp,服务端基于Netty编写。
44 0
|
4月前
|
机器学习/深度学习 PyTorch TensorFlow
iOS设备功能和框架: 什么是 Core ML?如何在应用中集成机器学习模型?
iOS设备功能和框架: 什么是 Core ML?如何在应用中集成机器学习模型?
35 0
|
4月前
|
iOS开发
iOS设备功能和框架: 如何使用 Core Animation 创建动画效果?
iOS设备功能和框架: 如何使用 Core Animation 创建动画效果?
101 0
|
6月前
|
小程序 开发工具 Android开发
Donut多端框架小程序打包适配ios和安卓app
腾讯新出了一个 Donut 多端框架,可以直接将微信小程序转成 ios 和 安卓 app,小程序开发者工具里也集成了 app 相关升级、调试和打包的功能,终于可以一套代码开发出3个客户端了!
137 0
Donut多端框架小程序打包适配ios和安卓app
|
6月前
|
移动开发 网络协议 安全
基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v8.0版已发布
MobileIMSDK 是一套专门为移动端开发的开源IM即时通讯框架,超轻量级、高度提炼,一套API优雅支持 UDP 、TCP 、WebSocket 三种协议,支持 iOS、Android、H5、标准Java、小程序、Uniapp,服务端基于Netty编写。
73 0
|
7月前
|
数据安全/隐私保护 Android开发 iOS开发
解决第三方邮箱APP登陆QQ、163邮箱无法验证账户名或密码的问题(IOS、MacOS、Windows、Android)
解决第三方邮箱APP登陆QQ、163邮箱无法验证账户名或密码的问题(IOS、MacOS、Windows、Android)
121 0