Interface RelativeURIBuilder
- All Known Subinterfaces:
URIBuilder
public interface RelativeURIBuilder
Builds a URI relative to some other URI.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionaddParameter(String parameterName, String parameterValue) Appends the specified query parameter to the URI created by this builder.addParameters(Map<String, String> parameters) Appends the specified query parameters to the URI created by this builder.default RelativeURIBuilderAppends the specified path to the URI created by this builder.Appends the specified path and path parameters to the URI created by this builder.build()Builds a URI.static RelativeURIBuilderReturns a URI builder based on the specified URI.setFragment(String fragment) Specifies the fragment (e.g. anchor) of the URI created by this builder.
-
Method Details
-
addPath
Appends the specified path to the URI created by this builder.- Parameters:
path- a URI path- Returns:
- a reference to this builder
-
addPath
Appends the specified path and path parameters to the URI created by this builder.- Parameters:
path- a URI pathparameters- the path parameters for the specified path- Returns:
- a reference to this builder
-
addParameter
Appends the specified query parameter to the URI created by this builder.- Parameters:
parameterName- a query parameter nameparameterValue- a query parameter name- Returns:
- a reference to this builder
-
addParameters
Appends the specified query parameters to the URI created by this builder.- Parameters:
parameters- a map of query parameters- Returns:
- a reference to this builder
-
setFragment
Specifies the fragment (e.g. anchor) of the URI created by this builder.- Parameters:
fragment- a URI fragment- Returns:
- a reference to this builder
-
build
-
relative
Returns a URI builder based on the specified URI.- Parameters:
base- the base URI- Returns:
- a URI builder based on the specified URI.
-