Skip to content

Commit

Permalink
Convert nullability to latest syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeplum committed Apr 9, 2015
1 parent 24fa12a commit 258e6d1
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions EGOCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,44 +45,44 @@
+ (nonnull instancetype)globalCache;

// Opitionally create a different EGOCache instance with it's own cache directory
- (nonnull instancetype)initWithCacheDirectory:(NSString __nonnull*)cacheDirectory;
- (nonnull instancetype)initWithCacheDirectory:(NSString * __nonnull)cacheDirectory;

- (void)clearCache;
- (void)removeCacheForKey:(NSString __nonnull*)key;
- (void)removeCacheForKey:(NSString * __nonnull)key;

- (BOOL)hasCacheForKey:(NSString __nonnull*)key;
- (BOOL)hasCacheForKey:(NSString * __nonnull)key;

- (NSData* __nullable)dataForKey:(NSString __nonnull*)key;
- (void)setData:(NSData __nonnull*)data forKey:(NSString __nonnull*)key;
- (void)setData:(NSData __nonnull*)data forKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (NSData * __nullable)dataForKey:(NSString * __nonnull)key;
- (void)setData:(NSData * __nonnull)data forKey:(NSString * __nonnull)key;
- (void)setData:(NSData * __nonnull)data forKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (NSString* __nullable)stringForKey:(NSString __nonnull*)key;
- (void)setString:(NSString __nonnull*)aString forKey:(NSString __nonnull*)key;
- (void)setString:(NSString __nonnull*)aString forKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (NSString * __nullable)stringForKey:(NSString * __nonnull)key;
- (void)setString:(NSString * __nonnull)aString forKey:(NSString * __nonnull)key;
- (void)setString:(NSString * __nonnull)aString forKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (NSDate* __nullable)dateForKey:(NSString __nonnull*)key;
- (NSArray __nonnull*)allKeys;
- (NSDate * __nullable)dateForKey:(NSString * __nonnull)key;
- (NSArray * __nonnull)allKeys;

#if TARGET_OS_IPHONE
- (UIImage* __nullable)imageForKey:(NSString __nonnull*)key;
- (void)setImage:(UIImage __nonnull*)anImage forKey:(NSString __nonnull*)key;
- (void)setImage:(UIImage __nonnull*)anImage forKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (UIImage * __nullable)imageForKey:(NSString * __nonnull)key;
- (void)setImage:(UIImage * __nonnull)anImage forKey:(NSString * __nonnull)key;
- (void)setImage:(UIImage * __nonnull)anImage forKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
#else
- (NSImage* __nullable)imageForKey:(NSString __nonnull*)key;
- (void)setImage:(NSImage __nonnull*)anImage forKey:(NSString __nonnull*)key;
- (void)setImage:(NSImage __nonnull*)anImage forKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (NSImage* __nullable)imageForKey:(NSString * __nonnull)key;
- (void)setImage:(NSImage * __nonnull)anImage forKey:(NSString * __nonnull)key;
- (void)setImage:(NSImage * __nonnull)anImage forKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
#endif

- (NSData* __nullable)plistForKey:(NSString __nonnull*)key;
- (void)setPlist:(nonnull id)plistObject forKey:(NSString __nonnull*)key;
- (void)setPlist:(nonnull id)plistObject forKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (NSData * __nullable)plistForKey:(NSString * __nonnull)key;
- (void)setPlist:(nonnull id)plistObject forKey:(NSString * __nonnull)key;
- (void)setPlist:(nonnull id)plistObject forKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (void)copyFilePath:(NSString __nonnull*)filePath asKey:(NSString __nonnull*)key;
- (void)copyFilePath:(NSString __nonnull*)filePath asKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (void)copyFilePath:(NSString * __nonnull)filePath asKey:(NSString * __nonnull)key;
- (void)copyFilePath:(NSString * __nonnull)filePath asKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (nullable id<NSCoding>)objectForKey:(NSString __nonnull*)key;
- (void)setObject:(nonnull id<NSCoding>)anObject forKey:(NSString __nonnull*)key;
- (void)setObject:(nonnull id<NSCoding>)anObject forKey:(NSString __nonnull*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (nullable id<NSCoding>)objectForKey:(NSString * __nonnull)key;
- (void)setObject:(nonnull id<NSCoding>)anObject forKey:(NSString * __nonnull)key;
- (void)setObject:(nonnull id<NSCoding>)anObject forKey:(NSString * __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

@property(nonatomic) NSTimeInterval defaultTimeoutInterval; // Default is 1 day
@end

0 comments on commit 258e6d1

Please sign in to comment.