NSMutableDictionary+safe.h 801 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // NSMutableDictionary+safe.h
  3. // categories
  4. //
  5. // Created by wentian on 17/6/1.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface NSMutableDictionary (safe)
  10. - (void)safe_setObject:(id)anObject forKey:(id<NSCopying>)aKey;
  11. @end
  12. // NSDictionary
  13. id yy_dicGetObject(NSDictionary * dic, id aKey, Class aClass);
  14. NSDictionary * yy_dicGetDicYY(NSDictionary *dic, id aKey);
  15. NSArray * yy_dicGetArrayYY(NSDictionary *dic, id aKey);
  16. NSArray * yy_dicGetArraySafe(NSDictionary *dic, id aKey);
  17. NSString * yy_dicGetString(NSDictionary *dic, id aKey);
  18. NSString * yy_dicGetStringSafe(NSDictionary *dic, id aKey);
  19. int yy_dicGetInt(NSDictionary *dic, id aKey, int nDefault);
  20. float yy_dicGetFloat(NSDictionary *dic, id aKey, float fDefault);
  21. BOOL yy_dicGetBool(NSDictionary *dic, id aKey, BOOL bDefault);