FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSNull.h
Go to the documentation of this file.
1 //
2 // NSNull.h
3 // FoundationExtension
4 //
5 // Created by Jeong YunWon on 13. 4. 9..
6 // Copyright (c) 2013 youknowone.org. All rights reserved.
7 //
8 
15 #import <Foundation/Foundation.h>
16 
21 @interface NSNull (Tools)
22 
23 /*
24  * @brief YES if obj is NSNull; otherwise NO.
25  */
26 + (BOOL)objectIsNull:(id)obj;
27 
28 /*
29  * @brief YES if obj is nil or NSNull; otherwise NO.
30  */
31 + (BOOL)objectIsNilOrNull:(id)obj;
32 
33 /*
34  * @brief Returns NSNull if obj is nil; otherwise obj.
35  */
36 + (id)nullIfObjectIsNil:(id)obj;
37 
38 /*
39  * @brief Returns nil if obj is NSNull; otherwise obj.
40  */
41 + (id)nilIfObjectIsNull:(id)obj;
42 
43 @end
NSNull tools.
Definition: NSNull.h:21