且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是Objective-C的NSDictionary的Java等价物?

更新时间:2022-10-15 08:48:44

NSDictionary is a class cluster (see the "Class Cluster" section in The Cocoa Fundamentals Guide), meaning that the actual implementation is hidden from you, the API user. In fact, the Foundation framework will choose the appropriate implementation at run time based on amount of data etc. In addition, NSDictionary can take any id as a key, not just NSString (of course, the -hash of the key object must be constant).

Thus, closest analog is probably Map<Object,Object>.

相关阅读

技术问答最新文章