Class Precondition (3.16.3)

public final class Precondition

Preconditions that can be used to restrict update() calls.

Inheritance

Object > Precondition

Static Fields

NONE

public static final Precondition NONE

An empty Precondition that adds no enforcements

Field Value
TypeDescription
Precondition

Static Methods

updatedAt(Timestamp updateTime)

public static Precondition updatedAt(Timestamp updateTime)

Creates a Precondition that enforces that the existing document was written at the specified time.

Parameter
NameDescription
updateTimecom.google.cloud.Timestamp

The write time to enforce on the existing document.

Returns
TypeDescription
Precondition

A new Precondition

Methods

equals(Object obj)

public boolean equals(Object obj)

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

Parameter
NameDescription
objObject

The object to compare against.

Returns
TypeDescription
boolean

Whether this Precondition is equal to the provided object.

Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides