Class PathElement (2.33.0)

publicfinalclass PathElementimplementsSerializable

Represents a single element in a key's path.

Inheritance

Object > PathElement

Implements

Serializable

Static Methods

of(String kind, String name)

publicstaticPathElementof(Stringkind,Stringname)
Parameters
Name Description
kind String
name String
Returns
Type Description
PathElement

of(String kind, long id)

publicstaticPathElementof(Stringkind,longid)
Parameters
Name Description
kind String
id long
Returns
Type Description
PathElement

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getId()

publicLonggetId()

Returns the ID of this path element.

Returns
Type Description
Long

getKind()

publicStringgetKind()

Returns the kind of this path element.

Returns
Type Description
String

getName()

publicStringgetName()

Returns the name of this path element.

Returns
Type Description
String

getNameOrId()

publicObjectgetNameOrId()

Returns the path element's ID (as Long) or name (as String). Never null.

Returns
Type Description
Object

hasId()

publicbooleanhasId()
Returns
Type Description
boolean

hasName()

publicbooleanhasName()
Returns
Type Description
boolean

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

toString()

publicStringtoString()
Returns
Type Description
String
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.