Mapping integers to booleans in Objective-C -
In Objective-C, I can add an unstable collection integers (monotonic, non-compatible, can be quite large) to boolean Value will be Clearly just one NSDictionary w / NSNumbers should be in the form of keys and value.
Is there any better way in which there is no such thing involved in creation? I'm not actually trying to pre-optimize as much to learn if there is a technique I'm not familiar about.
This data is private for the implementation of a particular class, so the rest of the Cocoa API is not a requirement. The common case of mapping one scalar to another is not some cocoa, it handles it well, Because it is centered on objects and it should be wrapped before doing anything to present the scalar. But in the case of boolean, there are only two possible mapped states, which opens a very easy way of doing this: set = presence in the Boolean state.
Comments
Post a Comment