Package com.inrupt.client.util
Class URIBuilder
- java.lang.Object
-
- com.inrupt.client.util.URIBuilder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
build()
Build a URI.URIBuilder
fragment(String fragment)
Set a fragment value for a URI.static URIBuilder
newBuilder(URI uri)
Create a new URI builder from an existing URI.URIBuilder
path(String path)
Append a path segment to a URI.URIBuilder
queryParam(String param, String value)
Set a query parameter for a URI.
-
-
-
Method Detail
-
newBuilder
public static URIBuilder newBuilder(URI uri)
Create a new URI builder from an existing URI.- Parameters:
uri
- the URI- Returns:
- the builder
-
path
public URIBuilder path(String path)
Append a path segment to a URI.- Parameters:
path
- the path segment- Returns:
- this builder
-
queryParam
public URIBuilder queryParam(String param, String value)
Set a query parameter for a URI.- Parameters:
param
- the parameter namevalue
- the parameter value- Returns:
- this builder
-
fragment
public URIBuilder fragment(String fragment)
Set a fragment value for a URI.- Parameters:
fragment
- the fragment value- Returns:
- this builder
-
build
public URI build()
Build a URI.- Returns:
- the newly constructed URI
-
-