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