Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // NSMutableInteger.h
- //
- // Created by Jonathan Annett on 21/11/13.
- // Copyright (c) 2013 Sophtwhere. All rights reserved.
- //
- /*
- what on earth? isn't NSInteger mutable already?
- yup. it's also not an object, so it can't be serialized, or put in an array/dictionary directly.
- sure there is NSNumber, but ever tried doing myNumber.integerValue ++?
- plus if you really want to, you can subclass to go crazy.
- enjoy.
- */
- #import <Foundation/Foundation.h>
- @interface NSMutableInteger : NSObject
- +(NSMutableInteger*) zero;
- +(NSMutableInteger*) one;
- +(NSMutableInteger*) yes;
- +(NSMutableInteger*) no;
- +(NSMutableInteger*) integer:(NSInteger) integer;
- -(id) initWithInteger:(NSInteger) integer;
- -(BOOL) boolValue;
- -(void) setBoolValue:(BOOL) value ;
- -(BOOL) odd;
- -(BOOL) even;
- -(void) clear;
- -(void) set;
- -(NSInteger) integerValue;
- -(NSInteger) increment;
- -(NSInteger) decrement;
- -(NSInteger) integerValuePlusOne;
- -(NSInteger) integerValueMinusOne;
- @property (assign,nonatomic) NSInteger integerValue;
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement