from

fun from(hexString: String): ObjectId

Generates a new ObjectId using the hexadecimal representation of the 12 bytes.

Parameters

hexString

the string to convert.


fun from(date: RealmInstant): ObjectId

Generates a new ObjectId using the provided timestamp.

Parameters

date

timestamp to be used.


fun from(bytes: ByteArray): ObjectId

Generates a new ObjectId using the unique 12 bytes representation.

Parameters

bytes

to use as backing representation