@@ -17,11 +17,11 @@ #import "OFSetTests.h" @interface CustomSet: OFSet { - OFMutableSet *_set; + OFSet *_set; } @end @implementation OFSetTests - (Class)setClass @@ -186,59 +186,16 @@ [OFNumber numberWithInt: 3]); } @end @implementation CustomSet -- (instancetype)init -{ - self = [super init]; - - @try { - _set = [[OFMutableSet alloc] init]; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (instancetype)initWithSet: (OFSet *)set -{ - self = [super init]; - - @try { - _set = [[OFMutableSet alloc] initWithSet: set]; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (instancetype)initWithArray: (OFArray *)array -{ - self = [super init]; - - @try { - _set = [[OFMutableSet alloc] initWithArray: array]; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments -{ - self = [super init]; - - @try { - _set = [[OFMutableSet alloc] initWithObject: firstObject - arguments: arguments]; +- (instancetype)initWithObjects: (id const *)objects count: (size_t)count +{ + self = [super init]; + + @try { + _set = [[OFSet alloc] initWithObjects: objects count: count]; } @catch (id e) { [self release]; @throw e; }