Path class final
An immutable path of ChildKey segments, such as /users/ada.
- Implemented types
Constructors
- Path(String pathString)
-
Parses
pathString: segments separated by/, empty segments ignored, soa/b,/a/band/a//b/are the same path.factory -
Path.fromKeys(List<
ChildKey> segments) -
A path of
segments.const -
Path.fromStrings(List<
String> segments) -
A path of the wire segment strings
segments; empty strings are skipped.factory
Properties
- back → ChildKey?
-
The last segment, or null for the root.
no setter
- front → ChildKey?
-
The first segment, or null for the root.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Whether this is the root.
no setter
- length → int
-
The number of segments.
no setter
- parent → Path?
-
The parent, or null for the root.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
→ List<
ChildKey> -
The segments, root first.
final
Methods
-
child(
ChildKey key) → Path -
This path with
keyappended. -
childPath(
Path other) → Path -
This path with every segment of
otherappended. -
compareTo(
Path other) → int -
Compares segment by segment with the child-key order; a prefix sorts first.
override
-
contains(
Path other) → bool -
Whether
otheris this path or below it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
popFront(
) → Path - The path without its first segment.
-
toString(
) → String -
The wire form:
/a/b,/for the root.override -
toStringList(
) → List< String> - The segment names (the wire and persistence form).
-
toUrlEncodedString(
) → String - The path with each segment percent-encoded, as REST URLs use it.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override