NSCompareHashTables
2つのハッシュテーブルのエレメントを比較します。同じならYESを返します
BOOL NSCompareHashTables (
NSHashTable * table1 ,
NSHashTable * table2 );
解説
2つのハッシュテーブルのエレメントを比較します。同じならYESを返します。
返り値
引数
( NSHashTable * )table1
( NSHashTable * )table2
フレームワーク
Foundation
クラス
NSCompareHashTables
Function
使用可能
10.0
参照
NSCreateHashTable
NSCreateHashTableWithZone
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSHashTable *hTable1 = NSCreateHashTable(NSNonOwnedPointerHashCallBacks, 10); NSHashInsert(hTable1, @"aaa"); NSHashInsert(hTable1, @"bbb"); NSHashInsert(hTable1, @"ccc"); NSHashTable *hTable2 = NSCreateHashTable(NSNonOwnedPointerHashCallBacks, 10); NSHashInsert(hTable2, @"aaa"); NSHashInsert(hTable2, @"bbb"); NSHashInsert(hTable2, @"ccc"); (NSCompareHashTables(hTable1, hTable2))? NSLog(@"YES") :NSLog(@"NO") ; } @end