pEpObjCAdapter/NSObject+Extension.h
author Dirk Zimmermann <dz@pep.security>
Fri, 20 Sep 2019 10:01:48 +0200
branchIOSAD-141
changeset 1250 b6a4d30abd26
parent 593 78a14e6e06d0
permissions -rw-r--r--
IOSAD-141 Test for "hammering" the engine.
dirk@592
     1
//
dirk@592
     2
//  NSObject+Extension.h
dirk@592
     3
//  pEpObjCAdapter
dirk@592
     4
//
dirk@592
     5
//  Created by Dirk Zimmermann on 24.04.18.
dirk@592
     6
//  Copyright © 2018 p≡p. All rights reserved.
dirk@592
     7
//
dirk@592
     8
dirk@592
     9
#import <Foundation/Foundation.h>
dirk@592
    10
dirk@592
    11
@interface NSObject (Extension)
dirk@592
    12
dirk@592
    13
/**
dirk@592
    14
 Invokes `[value1 isEqual:value2]` between all value pairs retrieved
dirk@592
    15
 from `self` and `other`, based on the list of keys.
dirk@592
    16
 @Note `nil` is considered equal to `nil`, in contrast to [NSObject isEqual:].
dirk@592
    17
 */
dirk@592
    18
- (BOOL)isEqualToObject:(NSObject * _Nonnull)other
dirk@592
    19
            basedOnKeys:(NSArray<NSString *> * _Nonnull)keys;
dirk@592
    20
dirk@593
    21
/**
dirk@593
    22
 Calculates a hash based on the given `keys`.
dirk@593
    23
 */
dirk@593
    24
- (NSUInteger)hashBasedOnKeys:(NSArray<NSString *> * _Nonnull)keys;
dirk@593
    25
dirk@592
    26
@end