ObjectId

mongo4cats.bson.`package`.ObjectId
object ObjectId

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ObjectId.type

Members list

Value members

Concrete methods

def apply(): ObjectId
def apply(hex: String): ObjectId

Constructs a new instance from a 24-byte hexadecimal string representation.

Constructs a new instance from a 24-byte hexadecimal string representation.

Value parameters

hex

the string to convert

Attributes

Throws
IllegalArgumentException

if the string is not a valid hex string representation of an ObjectId

def apply(bytes: Array[Byte]): ObjectId

Constructs a new instance from the given byte array

Constructs a new instance from the given byte array

Value parameters

bytes

the byte array

Attributes

Throws
IllegalArgumentException

if array is null or not of length 12

def apply(instant: Instant): ObjectId

Constructs a new instance using the given instant.

Constructs a new instance using the given instant.

Value parameters

instant

the instant

Attributes

def from(hex: String): Either[String, ObjectId]

Constructs a new instance from a 24-byte hexadecimal string representation.

Constructs a new instance from a 24-byte hexadecimal string representation.

Value parameters

hex

the string to convert

Attributes

def gen: ObjectId
def isValid(hex: String): Boolean