Class BsonObjectId (3.49.0)

public class BsonObjectId implements Serializable

Represents a BSON ObjectId type in Firestore documents.

Inheritance

Object > BsonObjectId

Implements

Serializable

Constructors

BsonObjectId(String oid)

public BsonObjectId(String oid)

Constructor that creates a new BSON ObjectId value with the given value.

Parameter
Name Description
oid String

The 24-character hex string representing the ObjectId.

Fields

value

public final String value
Field Value
Type Description
String

Methods

equals(Object obj)

public boolean equals(Object obj)

Returns true if this BsonObjectId is equal to the provided object.

Parameter
Name Description
obj Object

The object to compare against.

Returns
Type Description
boolean

Whether this BsonObjectId is equal to the provided object.

Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides