FieldPath

public final class FieldPath


A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a top level field in the document), or a list of field names (referring to a nested field in the document).

Summary

Public methods

static @NonNull FieldPath

Returns A special sentinel FieldPath to refer to the ID of a document.

boolean
int
static @NonNull FieldPath
of(String[] fieldNames)

Creates a FieldPath from the provided field names.

String

Public methods

documentId

public static @NonNull FieldPath documentId()

Returns A special sentinel FieldPath to refer to the ID of a document. It can be used in queries to sort or filter by the document ID.

equals

public boolean equals(Object o)

hashCode

public int hashCode()

of

public static @NonNull FieldPath of(String[] fieldNames)

Creates a FieldPath from the provided field names. If more than one field name is provided, the path will point to a nested field in a document.

Parameters
String[] fieldNames

A list of field names.

Returns
@NonNull FieldPath

A FieldPath that points to a field location in a document.

toString

public String toString()