Class Precondition (3.21.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
Type Description
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
Name Description
updateTime com.google.cloud.Timestamp

The write time to enforce on the existing document.

Returns
Type Description
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
Name Description
obj Object

The object to compare against.

Returns
Type Description
boolean

Whether this Precondition is equal to the provided object.

Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides