Interface: Path Stay organized with collections Save and categorize content based on your preferences.
rules. Path
interface static
Directory-like pattern for the location of a resource. Paths can be created in two ways. The first is in the "raw" form beginning with a forward slash/:
/path/to/resource
The second is by converting from a string using thepath() function:
path("path/to/resource")In addition to the methods listed below, paths have the following operators:
| Operator | Usage |
|---|---|
x == y | Compare paths x and y |
x[f] | Index operator, get value at binding field name f |
x[i] | Index operator, get value at numeric index i |
x.f | Value at binding field name f |
Method
bind
bind(map)
Bind key-value pairs in a map to a path.
Parameter | |
|---|---|
map | Map to bind. Value must not be null. |
Example
// Make the path '/path/something/another' by binding a map(/path/$(foo)/$(bar)).bind({"foo":"something","bar":"another"})Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-13 UTC.