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
Link s to the resource. |
void |
add(Link... links)
Adds all given
Link s 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
Link s contained in this resource. |
int |
hashCode() |
boolean |
hasLink(String rel)
Returns whether the resource contains a
Link with the given rel. |
boolean |
hasLinks()
Returns whether the resource contains
Link s at all. |
void |
removeLinks()
Removes all
Link s 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)
Link
s to the resource.links
- must not be null.public boolean hasLinks()
Link
s at all.public boolean hasLink(String rel)
Link
with the given rel.rel
- public void removeLinks()
Link
s added to the resource so far.public Link getLink(String rel)
rel
- Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.