blob: 6c8d72878599ef7ee5d6381ab066a2f0550d7846 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
//
// SDLObjectWithPriority.m
// SmartDeviceLink
//
#import "SDLObjectWithPriority.h"
NS_ASSUME_NONNULL_BEGIN
@implementation SDLObjectWithPriority
- (instancetype)initWithObject:(nullable id)object priority:(NSInteger)priority {
self = [super init];
if (self == nil) {
return nil;
}
self.object = object;
self.priority = priority;
return self;
}
- (instancetype)init {
return [self initWithObject:nil priority:NSIntegerMax];
}
+ (instancetype)objectWithObject:(nullable id)object priority:(NSInteger)priority {
return [[self alloc] initWithObject:object priority:priority];
}
@end
NS_ASSUME_NONNULL_END
|