@@ -38,32 +38,32 @@ + dictionaryWithHashSize: (int)hashsize { return [[[self alloc] initWithHashSize: hashsize] autorelease]; } -+ dictionaryWithKey: (OFObject *)key - andObject: (OFObject*)obj -{ - return [[[self alloc] initWithKey: key - andObject: obj] autorelease]; -} - -+ dictionaryWithKeys: (OFArray*)keys - andObjects: (OFArray*)objs -{ - return [[[self alloc] initWithKeys: keys - andObjects: objs] autorelease]; ++ dictionaryWithObject: (OFObject*)obj + forKey: (OFObject *)key +{ + return [[[self alloc] initWithObject: obj + forKey: key] autorelease]; +} + ++ dictionaryWithObjects: (OFArray*)objs + forKeys: (OFArray*)keys +{ + return [[[self alloc] initWithObjects: objs + forKeys: keys] autorelease]; } + dictionaryWithKeysAndObjects: (OFObject *)first, ... { id ret; va_list args; va_start(args, first); ret = [[[self alloc] initWithKey: first - andArgList: args] autorelease]; + argList: args] autorelease]; va_end(args); return ret; } @@ -102,11 +102,11 @@ if (dict == nil) { Class c = isa; size = 0; [self dealloc]; @throw [OFInvalidArgumentException newWithClass: c - andSelector: _cmd]; + selector: _cmd]; } size = dict->size; @try { @@ -176,11 +176,11 @@ if (hashsize < 8 || hashsize >= 28) { Class c = isa; [super dealloc]; @throw [OFInvalidArgumentException newWithClass: c - andSelector: _cmd]; + selector: _cmd]; } size = (size_t)1 << hashsize; @try { @@ -198,12 +198,12 @@ memset(data, 0, size * sizeof(OFList*)); return self; } -- initWithKey: (OFObject *)key - andObject: (OFObject*)obj +- initWithObject: (OFObject*)obj + forKey: (OFObject *)key { Class c; uint32_t fullhash, hash; self = [self init]; @@ -210,11 +210,11 @@ if (key == nil || obj == nil) { c = isa; [self dealloc]; @throw [OFInvalidArgumentException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } fullhash = [key hash]; hash = fullhash & (size - 1); @@ -241,12 +241,12 @@ } return self; } -- initWithKeys: (OFArray*)keys - andObjects: (OFArray*)objs +- initWithObjects: (OFArray*)objs + forKeys: (OFArray*)keys { Class c; OFObject **keys_data; OFObject **objs_data; size_t count, i; @@ -256,11 +256,11 @@ if (keys == nil || objs == nil || count != [objs count]) { c = isa; [self dealloc]; @throw [OFInvalidArgumentException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } keys_data = [keys data]; objs_data = [objs data]; @@ -270,11 +270,11 @@ if (keys_data[i] == nil || objs_data[i] == nil) { c = isa; [self dealloc]; @throw [OFInvalidArgumentException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } fullhash = [keys_data[i] hash]; hash = fullhash & (size - 1); @@ -312,18 +312,18 @@ id ret; va_list args; va_start(args, first); ret = [self initWithKey: first - andArgList: args]; + argList: args]; va_end(args); return ret; } - initWithKey: (OFObject *)first - andArgList: (va_list)args + argList: (va_list)args { OFObject *key; OFObject *obj; Class c; uint32_t fullhash, hash; @@ -333,11 +333,11 @@ if (first == nil || obj == nil) { c = isa; [self dealloc]; @throw [OFInvalidArgumentException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } fullhash = [first hash]; hash = fullhash & (size - 1); @@ -367,11 +367,11 @@ while ((key = va_arg(args, OFObject *)) != nil) { if ((obj = va_arg(args, OFObject*)) == nil) { c = isa; [self dealloc]; @throw [OFInvalidArgumentException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } fullhash = [key hash]; hash = fullhash & (size - 1); @@ -426,11 +426,11 @@ uint32_t hash; of_dictionary_list_object_t *iter; if (key == nil) @throw [OFInvalidArgumentException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; hash = [key hash] & (size - 1); if (data[hash] == nil) return nil; @@ -480,20 +480,20 @@ - setObject: (OFObject*)obj forKey: (OFObject *)key { @throw [OFNotImplementedException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } - removeObjectForKey: (OFObject*)key { @throw [OFNotImplementedException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } - changeHashSize: (int)hashsize { @throw [OFNotImplementedException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; } @end