You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pEpObjCAdapter/pEpObjCAdapter/NSObject+Extension.h

27 lines
667 B
Objective-C

//
// NSObject+Extension.h
// pEpObjCAdapter
//
// Created by Dirk Zimmermann on 24.04.18.
// Copyright © 2018 p≡p. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSObject (Extension)
/**
Invokes `[value1 isEqual:value2]` between all value pairs retrieved
from `self` and `other`, based on the list of keys.
@Note `nil` is considered equal to `nil`, in contrast to [NSObject isEqual:].
*/
- (BOOL)isEqualToObject:(NSObject * _Nonnull)other
basedOnKeys:(NSArray<NSString *> * _Nonnull)keys;
/**
Calculates a hash based on the given `keys`.
*/
- (NSUInteger)hashBasedOnKeys:(NSArray<NSString *> * _Nonnull)keys;
@end