Returns this URI's path as a list of path segments not including the '/' segment delimiters. Prefer this method over #getPath() because it preserves the distinction between segment separators and literal '/'s within a path segment. A trailing '/' delimiter in the path results in the
()
| 495 | * <p>The returned list is immutable. |
| 496 | */ |
| 497 | public List<String> getPathSegments() { |
| 498 | // Returned list must be immutable but we intentionally keep guava out of the public API. |
| 499 | ImmutableList.Builder<String> segmentsBuilder = ImmutableList.builder(); |
| 500 | parseAssumedUtf8PathIntoSegments(path, segmentsBuilder); |
| 501 | return segmentsBuilder.build(); |
| 502 | } |
| 503 | |
| 504 | /** |
| 505 | * Returns true iff this URI's path component starts with a path segment (rather than the '/' |