#import <Foundation/Foundation.h>

@interface TestItem : NSObject {
    id value;
}
@end
@implementation TestItem
- (id)initWithValue:(id)aValue {
    [super init];
    value = [aValue retain];
    return self;
}

- (BOOL)isEqual:(id)anObject {
    NSLog(@"[%@ isEqual:%@(%@)]", value, [anObject className], anObject);
    return [value intValue] == [anObject intValue];
}
@end

int
main(int argc, char **argv)
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    TestItem *item = [[TestItem alloc] initWithValue:[NSNumber numberWithInt:100]];
    NSMutableArray *a = [NSMutableArray array];

    [a addObject:item];
    printf("integer => %d string => %d\n", 
	   [a containsObject:[NSNumber numberWithInt:100]],
	   [a containsObject:[NSString stringWithCString:"100"]]);
    [pool release];
    return 0;
}
