Objective-C
@interface RLMObjectId : NSObject <NSCopying>
Swift
@_nonSendable(_assumed) class RLMObjectId : NSObject, NSCopying, @unchecked Sendable
A 12-byte (probably) unique object identifier.
ObjectIds are similar to a GUID or a UUID, and can be used to uniquely identify objects without a centralized ID generator. An ObjectID consists of:
ObjectIds are intended to be fast to generate. Sorting by an ObjectId field will typically result in the objects being sorted in creation order.
Creates a new randomly-initialized ObjectId.
DeclarationObjective-C
+ (nonnull instancetype)objectId;
Swift
class func generate() -> Self
Creates a new zero-initialized ObjectId.
DeclarationObjective-C
- (nonnull instancetype)init;
Creates a new ObjectId from the given 24-byte hexadecimal string.
Returns nil
and sets error
if the string is not 24 characters long or contains any characters other than 0-9a-fA-F.
Objective-C
- (nullable instancetype)initWithString:(nonnull NSString *)string
error:(NSError *_Nullable *_Nullable)error;
Swift
init(string: String) throws
Parameters string
The string to parse.
Creates a new ObjectId using the given date, machine identifier, process identifier.
DeclarationObjective-C
- (nonnull instancetype)initWithTimestamp:(nonnull NSDate *)timestamp
machineIdentifier:(int)machineIdentifier
processIdentifier:(int)processIdentifier;
Swift
init(timestamp: Date, machineIdentifier: Int32, processIdentifier: Int32)
Parameters timestamp
A timestamp as NSDate.
machineIdentifier
The machine identifier.
processIdentifier
The process identifier.
Comparision operator to check if the right hand side is greater than the current value.
DeclarationObjective-C
- (BOOL)isGreaterThan:(nullable RLMObjectId *)objectId;
Swift
func isGreaterThan(_ objectId: RLMObjectId?) -> Bool
Comparision operator to check if the right hand side is greater than or equal to the current value.
DeclarationObjective-C
- (BOOL)isGreaterThanOrEqualTo:(nullable RLMObjectId *)objectId;
Swift
func isGreaterThanOrEqual(to objectId: RLMObjectId?) -> Bool
Comparision operator to check if the right hand side is less than the current value.
DeclarationObjective-C
- (BOOL)isLessThan:(nullable RLMObjectId *)objectId;
Swift
func isLessThan(_ objectId: RLMObjectId?) -> Bool
Comparision operator to check if the right hand side is less than or equal to the current value.
DeclarationObjective-C
- (BOOL)isLessThanOrEqualTo:(nullable RLMObjectId *)objectId;
Swift
func isLessThanOrEqual(to objectId: RLMObjectId?) -> Bool
Get the ObjectId as a 24-character hexadecimal string.
DeclarationObjective-C
@property (nonatomic, readonly) NSString *_Nonnull stringValue;
Swift
var stringValue: String { get }
Get the timestamp for the RLMObjectId
DeclarationObjective-C
@property (nonatomic, readonly) NSDate *_Nonnull timestamp;
Swift
var timestamp: Date { get }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4