Class FieldPath (3.15.0)

public abstract class FieldPath extends BasePath<FieldPath> implements Comparable<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).

Inheritance

java.lang.Object > BasePath > FieldPath

Static Methods

documentId()

public static FieldPath documentId()

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

Returns
TypeDescription
FieldPath

fromServerFormat(String path)

public static FieldPath fromServerFormat(String path)
Parameter
NameDescription
pathString
Returns
TypeDescription
FieldPath

of(String[] fieldNames)

public static 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.

Parameter
NameDescription
fieldNamesString[]

A list of field names.

Returns
TypeDescription
FieldPath

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

Constructors

FieldPath()

public FieldPath()

Methods

toString()

public String toString()
Returns
TypeDescription
String
Overrides