public interface UriBuilder
| Modifier and Type | Method and Description | 
|---|---|
URI | 
build()
The constructed URI. 
 | 
URI | 
expand(Map<String,? super Object> values)
Expands the URI if it is a template, using the given values. 
 | 
UriBuilder | 
fragment(String fragment)
Sets the URI fragment. 
 | 
UriBuilder | 
host(String host)
Sets the URI host. 
 | 
static UriBuilder | 
of(CharSequence uri)
Create a  
UriBuilder with the given base URI as a starting point. | 
static UriBuilder | 
of(URI uri)
Create a  
UriBuilder with the given base URI as a starting point. | 
UriBuilder | 
path(String path)
Appends the given path to the existing path correctly handling '/'. 
 | 
UriBuilder | 
port(int port)
Sets the URI port. 
 | 
UriBuilder | 
queryParam(String name,
          Object... values)
Adds a query parameter for the give name and values. 
 | 
UriBuilder | 
replacePath(String path)
Replaces the existing path if any. 
 | 
UriBuilder | 
scheme(String scheme)
Sets the URI scheme. 
 | 
UriBuilder | 
userInfo(String userInfo)
Sets the URI user info. 
 | 
@Nonnull UriBuilder fragment(@Nullable String fragment)
fragment - The fragument@Nonnull UriBuilder scheme(@Nullable String scheme)
scheme - The scheme@Nonnull UriBuilder userInfo(@Nullable String userInfo)
userInfo - The use info@Nonnull UriBuilder host(@Nullable String host)
host - The host to use@Nonnull UriBuilder port(int port)
port - The port to use@Nonnull UriBuilder path(@Nullable String path)
path - The path@Nonnull UriBuilder replacePath(@Nullable String path)
path - The path@Nonnull UriBuilder queryParam(String name, Object... values)
name - The namevalues - The values@Nonnull URI build()
UriSyntaxException - if the URI to be constructed is invalid@Nonnull URI expand(Map<String,? super Object> values)
values - Expands the URI with the given values.@Nonnull static UriBuilder of(@Nonnull URI uri)
UriBuilder with the given base URI as a starting point.uri - The URI@Nonnull static UriBuilder of(@Nonnull CharSequence uri)
UriBuilder with the given base URI as a starting point.uri - The URI