קטגוריית NSDictionary(GCKAdditions)

הפניה לקטגוריה NSDictionary(GCKAdditions)

סקירה כללית

קטגוריה שמוסיפה כמה שיטות נוחות ל-NSDictionary להגדרה ולחיפוש בטוח של ערכים מסוגים שונים.

השיטות האלה שימושיות במיוחד לקבלת ולהגדרה של שדות של אובייקטים של נתוני JSON.

סיכום שיטות של מכונה

(NSString *__nullable) - gck_stringForKey:withDefaultValue:
 מחפשת ערך NSString למפתח, עם ערך חלופי נתון. עוד...
 
(NSString *__nullable) - gck_stringForKey:
 מחפש ערך NSString למפתח, עם ערך חלופי של nil. עוד...
 
(NSInteger) - gck_integerForKey:withDefaultValue:
 מחפש ערך NSInteger למפתח, עם ערך חלופי נתון. עוד...
 
(NSUInteger) - gck_uintegerForKey:withDefaultValue:
 מחפש ערך NSUInteger למפתח, עם ערך חלופי נתון. עוד...
 
(NSInteger) - gck_integerForKey:
 מחפש ערך NSInteger למפתח, עם ערך חלופי של 0. עוד...
 
(NSUInteger) - gck_uintegerForKey:
 מחפש ערך NSUInteger למפתח, עם ערך חלופי של 0. עוד...
 
(double) - gck_doubleForKey:withDefaultValue:
 מחפשת ערך כפול למפתח, עם ערך חלופי נתון. עוד...
 
(double) - gck_doubleForKey:
 מחפש ערך כפול למפתח, עם ערך חלופי של 0.0. עוד...
 
(BOOL) - gck_boolForKey:withDefaultValue:
 מחפשת ערך BOOL של מפתח, עם ערך חלופי נתון. עוד...
 
(BOOL) - gck_boolForKey:
 מחפש ערך BOOL למפתח, עם ערך חלופי של NO. עוד...
 
(NSDictionary *__nullable) - gck_dictionaryForKey:
 מחפש ערך NSDictionary למפתח, עם ערך חלופי של nil. עוד...
 
(NSArray *__nullable) - gck_arrayForKey:
 מחפש ערך NSArray למפתח, עם ערך חלופי של nil. עוד...
 
(NSURL *__nullable) - gck_urlForKey:
 מחפש ערך NSURL למפתח, עם ערך חלופי של nil. עוד...
 
(void) - gck_setStringValue:forKey:
 מגדירה ערך NSString למפתח. עוד...
 
(void) - gck_setIntegerValue:forKey:
 מגדירה ערך NSInteger למפתח. עוד...
 
(void) - gck_setUIntegerValue:forKey:
 מגדירה ערך NSUInteger למפתח. עוד...
 
(void) - gck_setDoubleValue:forKey:
 מגדירה ערך כפול למפתח. עוד...
 
(void) - gck_setBoolValue:forKey:
 מגדירה ערך BOOL של מפתח. עוד...
 

פרטי השיטה

- (NSString *__nullable) gck_stringForKey: (NSString *)  key
withDefaultValue: (NSString *__nullable)  defaultValue 

מחפשת ערך NSString למפתח, עם ערך חלופי נתון.

Parameters
keyThe key.
defaultValueThe default value to return if the key is not found or if its value is not an NSString.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSString. אחרת, ערך ברירת המחדל.
- (NSString *__nullable) gck_stringForKey: (NSString *)  key

מחפש ערך NSString למפתח, עם ערך חלופי של nil.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא, והיה NSString. אחרת, nil.
- (NSInteger) gck_integerForKey: (NSString *)  key
withDefaultValue: (NSInteger)  defaultValue 

מחפש ערך NSInteger למפתח, עם ערך חלופי נתון.

Parameters
keyThe key.
defaultValueThe default value to return if the key is not found or if its value is not an NSNumber.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber. אחרת, ערך ברירת המחדל.
- (NSUInteger) gck_uintegerForKey: (NSString *)  key
withDefaultValue: (NSUInteger)  defaultValue 

מחפש ערך NSUInteger למפתח, עם ערך חלופי נתון.

Parameters
keyThe key.
defaultValueThe default value to return if the key is not found or if its value is not an NSNumber.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber. אחרת, ערך ברירת המחדל.
- (NSInteger) gck_integerForKey: (NSString *)  key

מחפש ערך NSInteger למפתח, עם ערך חלופי של 0.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber; אחרת, 0.
- (NSUInteger) gck_uintegerForKey: (NSString *)  key

מחפש ערך NSUInteger למפתח, עם ערך חלופי של 0.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber; אחרת, 0.
- (double) gck_doubleForKey: (NSString *)  key
withDefaultValue: (double)  defaultValue 

מחפשת ערך כפול למפתח, עם ערך חלופי נתון.

Parameters
keyThe key.
defaultValueThe default value to return if the key is not found or if its value is not an NSNumber.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber. אחרת, ערך ברירת המחדל.
- (double) gck_doubleForKey: (NSString *)  key

מחפש ערך כפול למפתח, עם ערך חלופי של 0.0.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber; אחרת, 0.0.
- (BOOL) gck_boolForKey: (NSString *)  key
withDefaultValue: (BOOL)  defaultValue 

מחפשת ערך BOOL של מפתח, עם ערך חלופי נתון.

Parameters
keyThe key.
defaultValueThe default value to return if the key is not found or if its value is not an NSNumber.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber. אחרת, ערך ברירת המחדל.
- (BOOL) gck_boolForKey: (NSString *)  key

מחפש ערך BOOL למפתח, עם ערך חלופי של NO.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSNumber; אחרת, NO.
- (NSDictionary *__nullable) gck_dictionaryForKey: (NSString *)  key

מחפש ערך NSDictionary למפתח, עם ערך חלופי של nil.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSDictionary; אחרת nil.
- (NSArray *__nullable) gck_arrayForKey: (NSString *)  key

מחפש ערך NSArray למפתח, עם ערך חלופי של nil.

Parameters
keyThe key.
החזרות
הערך של המפתח, אם הוא נמצא והיה NSArray; אחרת, nil.
- (NSURL *__nullable) gck_urlForKey: (NSString *)  key

מחפש ערך NSURL למפתח, עם ערך חלופי של nil.

Parameters
keyThe key.
החזרות
הערך של המפתח כ-NSURL, אם הוא נמצא והיה NSString; אחרת, nil.
- (void) gck_setStringValue: (NSString *)  value
forKey: (NSString *)  key 

מגדירה ערך NSString למפתח.

Parameters
valueThe value.
keyThe key.
- (void) gck_setIntegerValue: (NSInteger)  value
forKey: (NSString *)  key 

מגדירה ערך NSInteger למפתח.

Parameters
valueThe value.
keyThe key.
- (void) gck_setUIntegerValue: (NSUInteger)  value
forKey: (NSString *)  key 

מגדירה ערך NSUInteger למפתח.

Parameters
valueThe value.
keyThe key.
- (void) gck_setDoubleValue: (double)  value
forKey: (NSString *)  key 

מגדירה ערך כפול למפתח.

Parameters
valueThe value.
keyThe key.
- (void) gck_setBoolValue: (BOOL)  value
forKey: (NSString *)  key 

מגדירה ערך BOOL של מפתח.

Parameters
valueThe value.
keyThe key.