| Constructor and Description |
|---|
Link.Builder() |
| Modifier and Type | Method and Description |
|---|---|
Link |
build()
Finish building this link and return the instance.
|
Link |
build(Object... values)
Finish building this link using the supplied values as URI parameters.
|
Link.Builder |
param(String name,
String value)
Set an arbitrary parameter on this link.
|
Link.Builder |
rel(String rel)
Convenience method to set a link relation.
|
Link.Builder |
title(String title)
Convenience method to set a "title" on this link.
|
Link.Builder |
type(String type)
Convenience method to set a "type" on this link.
|
Link.Builder |
uri(String uri)
Set underlying string representing URI template for the link being
constructed.
|
Link.Builder |
uri(URI uri)
Set underlying URI template for the link being constructed.
|
Link.Builder |
uriBuilder(UriBuilder uriBuilder)
Set underlying URI builder representing the URI template for the link
being constructed.
|
public Link.Builder uri(URI uri)
uri - underlying URI for linkpublic Link.Builder uri(String uri) throws IllegalArgumentException
uri - underlying URI for link.IllegalArgumentException - if string representation of URI is invalid.public Link.Builder uriBuilder(UriBuilder uriBuilder)
uriBuilder - underlying URI builder.public Link.Builder rel(String rel)
rel - relation name.IllegalArgumentException - if the name is null.public Link.Builder title(String title)
title - title parameter of this link.IllegalArgumentException - if the title is null.public Link.Builder type(String type)
type - type parameter of this link.IllegalArgumentException - if the type is null.public Link.Builder param(String name, String value) throws IllegalArgumentException
build(Object...).name - the name of the parameter.value - the value set for the parameter.IllegalArgumentException - if either the name or value are null.public Link build()
IllegalArgumentException - if there are any URI template parameters
without a supplied value.UriBuilderException - if a URI cannot be constructed based on the
current state of the builder.public Link build(Object... values) throws UriBuilderException
values - parameters used to build underlying URI.IllegalArgumentException - if there are any URI template parameters
without a supplied value, or if a value is null.UriBuilderException - if a URI cannot be constructed based on the
current state of the underlying URI builder.Copyright © 2013. All Rights Reserved.