Summary:public Add modeling of methods that can raise exceptions when parameters are nil, and that return nil when passed nil. Reviewed By: dulmarod Differential Revision: D3101739 fb-gh-sync-id: 76af5a2 fbshipit-source-id: 76af5a2master
parent
e9cb9f4352
commit
6278dc7200
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2016 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface NSMapTable : NSObject
|
||||
|
||||
- (id)objectForKey:(id)aKey;
|
||||
|
||||
@end
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2016 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "NSMapTable.h"
|
||||
|
||||
@implementation NSMapTable
|
||||
|
||||
- (id)objectForKey:(id)aKey {
|
||||
if (aKey == NULL)
|
||||
return NULL;
|
||||
return [NSObject alloc];
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in new issue