Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Interface: Path

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:


OperatorUsage
x == yCompare 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.fValue at binding field name f

Method

bind

bind(map)

Bind key-value pairs in a map to a path.

Parameter

map

rules.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.


[8]ページ先頭

©2009-2026 Movatter.jp