public class ResourceSupport extends java.lang.Object implements org.springframework.hateoas.Identifiable<Link>
Constructor and Description |
---|
ResourceSupport() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Iterable<Link> links)
Adds all given
Link s to the resource. |
void |
add(Link link)
Adds the given link to the resource.
|
boolean |
equals(java.lang.Object obj) |
Link |
getId() |
Link |
getLink(java.lang.String rel)
Returns the link with the given rel.
|
java.util.List<Link> |
getLinks()
Returns all
Link s contained in this resource. |
int |
hashCode() |
boolean |
hasLink(java.lang.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. |
java.lang.String |
toString() |
private final java.util.List<Link> links
public Link getId()
public void add(Link link)
link
- public void add(java.lang.Iterable<Link> links)
Link
s to the resource.links
- public boolean hasLinks()
Link
s at all.public boolean hasLink(java.lang.String rel)
Link
with the given rel.rel
- public void removeLinks()
Link
s added to the resource so far.public Link getLink(java.lang.String rel)
rel
- public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object