FunkyPair
@interface FunkyPair < __covariant KeyType : id <NSCopying>
, __covariant ObjectType > : NSObject @end
This is a data structure representing a key-value pair
-
The identifier of the stored value
Declaration
Objective-C
@property (readwrite, strong, nonatomic) KeyType key;Swift
var key: KeyType! { get set } -
The value belonging to the given key
Declaration
Objective-C
@property (readwrite, strong, nonatomic) ObjectType value;Swift
var value: ObjectType! { get set } -
Creates a new pair structure given the key and the value parameters
Declaration
Objective-C
+ (instancetype)pairWithKey:(KeyType)key value:(ObjectType)value;Swift
convenience init!(key: KeyType!, value: ObjectType!)Parameters
keyThe identifier
valueThe stored value
-
Creates a new pair structure with the same value but with a new key
Declaration
Objective-C
- (FunkyPair *)pairByModifyingKey:(KeyType)key;Swift
func modifyingKey(_ key: KeyType!) -> FunkyPairParameters
keyThe new identifier to use for the value
Return Value
A new pair structure with the given the new
key -
Creates a new pair structure with the same key but with a new value
Declaration
Objective-C
- (FunkyPair *)pairByModifyingValue:(ObjectType)value;Swift
func modifyingValue(_ value: ObjectType!) -> FunkyPairParameters
valueThe new value to use for the key
Return Value
A new pair structure with the given the new
value
View on GitHub
Install in Dash
FunkyPair Class Reference