EMEmvMap

Objective-C


@interface EMEmvMap<__covariant ObjectType>
    : NSMutableDictionary <NSNumber *, ObjectType>

Swift

class EMEmvMap<ObjectType> : NSMutableDictionary where ObjectType : AnyObject

EMEmvMap.

Since

5.0
  • Add object with key to map. Only if not exists already.

    Declaration

    Objective-C

    - (BOOL)addObject:(ObjectType)anObject withKey:(NSInteger)aKey;

    Swift

    func add(_ anObject: ObjectType!, withKey aKey: Int) -> Bool

    Parameters

    anObject

    Object you want to add to map.

    aKey

    Unique key.

    Return Value

    YES if operation was successful.

  • Get object for given key.

    Declaration

    Objective-C

    - (ObjectType)objectWithKey:(NSInteger)aKey;

    Swift

    func object(withKey aKey: Int) -> ObjectType!

    Parameters

    aKey

    Unique key.

    Return Value

    Object or nil if key does not exits.

  • Get subset of map for selected Id range.

    Declaration

    Objective-C

    - (EMEmvMap *)subMap:(NSInteger)aMin max:(NSInteger)aMax;

    Swift

    func subMap(_ aMin: Int, max aMax: Int) -> EMEmvMap<AnyObject>!

    Parameters

    aMin

    Bottom limit of id.

    aMax

    Top limit of id.

    Return Value

    Subset for given range.