Interface RelativeURIBuilder

All Known Subinterfaces:
URIBuilder

public interface RelativeURIBuilder
Builds a URI relative to some other URI.
Author:
Paul Ferraro
  • Method Details

    • addPath

      default RelativeURIBuilder addPath(String path)
      Appends the specified path to the URI created by this builder.
      Parameters:
      path - a URI path
      Returns:
      a reference to this builder
    • addPath

      RelativeURIBuilder addPath(String path, Map<String,String> parameters)
      Appends the specified path and path parameters to the URI created by this builder.
      Parameters:
      path - a URI path
      parameters - the path parameters for the specified path
      Returns:
      a reference to this builder
    • addParameter

      RelativeURIBuilder addParameter(String parameterName, String parameterValue)
      Appends the specified query parameter to the URI created by this builder.
      Parameters:
      parameterName - a query parameter name
      parameterValue - a query parameter name
      Returns:
      a reference to this builder
    • addParameters

      RelativeURIBuilder addParameters(Map<String,String> parameters)
      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

      RelativeURIBuilder setFragment(String fragment)
      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

      URI build()
      Builds a URI.
      Returns:
      a URI
    • relative

      static RelativeURIBuilder relative(URI base)
      Returns a URI builder based on the specified URI.
      Parameters:
      base - the base URI
      Returns:
      a URI builder based on the specified URI.