public class ResourceSupport extends Object implements Identifiable<Link>
| Constructor and Description |
|---|
ResourceSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Iterable<Link> links)
Adds all given
Links to the resource. |
void |
add(Link... links)
Adds all given
Links to the resource. |
void |
add(Link link)
Adds the given link to the resource.
|
boolean |
equals(Object obj) |
Link |
getId()
Returns the
Link with a rel of Link.REL_SELF. |
Link |
getLink(String rel)
Returns the link with the given rel.
|
List<Link> |
getLinks()
Returns all
Links contained in this resource. |
List<Link> |
getLinks(String rel)
Returns all
Links with the given relation type. |
int |
hashCode() |
boolean |
hasLink(String rel)
Returns whether the resource contains a
Link with the given rel. |
boolean |
hasLinks()
Returns whether the resource contains
Links at all. |
void |
removeLinks()
Removes all
Links added to the resource so far. |
String |
toString() |
public Link getId()
Link with a rel of Link.REL_SELF.getId in interface Identifiable<Link>public void add(Link link)
link - public void add(Link... links)
Links to the resource.links - must not be null.public boolean hasLinks()
Links at all.public boolean hasLink(String rel)
Link with the given rel.rel - public void removeLinks()
Links added to the resource so far.public Link getLink(String rel)
rel - public List<Link> getLinks(String rel)
Links with the given relation type.ListCopyright © 2012-2016–2017 Pivotal, Inc.. All rights reserved.