Builder

class Builder

A mutable builder used to construct UrlPath instances

Constructors

Link copied to clipboard
constructor()

Initialize an empty UrlPath builder

Properties

Link copied to clipboard

Get or set the URL path as a decoded string.

Link copied to clipboard

A mutable list of decoded path segments. Any changes to this list will update the builder.

Link copied to clipboard

Get or set the URL path as an encoded string.

Link copied to clipboard

A mutable list of encoded path segments. Any changes to this list will update the builder.

Link copied to clipboard

Gets the segments of this URL path

Link copied to clipboard

Indicates whether a trailing slash is present in the path (e.g., "/foo/bar/" vs "/foo/bar")

Functions

Link copied to clipboard
fun build(): UrlPath

Build a new UrlPath from the currently-configured builder values

Link copied to clipboard
fun copyFrom(other: UrlPath)

Copies the state from other into this builder. All existing state is overwritten.

Link copied to clipboard

Applies the given DSL block to the decoded path segments. Any changes to the list will update the builder.

Link copied to clipboard

Applies the given DSL block to the encoded path segments. Any changes to the list will update the builder.

Link copied to clipboard
fun normalize()

Normalizes the segments of a URL path according to the following rules: