@@ -57,10 +57,17 @@ arguments: arguments]; va_end(arguments); return ret; } + +- initWithObjects: (id*)objects + count: (size_t)count +{ + return (id)[[OFSet_hashtable alloc] initWithObjects: objects + count: count]; +} - initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFSet_hashtable alloc] initWithObject: firstObject @@ -134,10 +141,17 @@ arguments: arguments] autorelease]; va_end(arguments); return ret; } + ++ setWithObjects: (id*)objects + count: (size_t)count +{ + return [[[self alloc] initWithObjects: objects + count: count] autorelease]; +} - init { if (isa == [OFSet class]) { Class c = isa; @@ -163,11 +177,11 @@ [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } -- (id)initWithObjects:(id)firstObject, ... +- (id)initWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); @@ -175,10 +189,19 @@ arguments: arguments]; va_end(arguments); return ret; } + +- initWithObjects: (id*)objects + count: (size_t)count +{ + Class c = isa; + [self release]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; +} - initWithObject: (id)firstObject arguments: (va_list)arguments { Class c = isa;