public class PathUtil extends Object implements Serializable
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
PathUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getPath(List<String> segments)
Join the segments into a url path.
|
static String |
getPath(String basePath,
List<String> segments)
Join the segments into a url path.
|
static List<String> |
getSegmentsList(String path)
Returns an unmodifiable list containing the segments of the specified
path.
|
static String |
trimSegmentsString(String path)
Trim the path by removing any leading and trailing whitespaces and
trailing slashes.
|
public static List<String> getSegmentsList(String path)
path
- url path to split into segments. The path may also start with
a slash `/` but it may not contain the url protocol.public static String getPath(List<String> segments)
segments
- path segments.public static String getPath(String basePath, List<String> segments)
basePath
- path prefix.segments
- path segments following the prefix.public static String trimSegmentsString(String path)
path
- url path to trim, not nullCopyright © 2025. All rights reserved.