|
Spring Hateoas | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.hateoas.ResourceSupport
org.springframework.hateoas.Resources<T>
public class Resources<T>
General helper to easily create a wrapper for a collection of entities.
| Constructor Summary | |
|---|---|
protected |
Resources()
Creates an empty Resources instance. |
|
Resources(Iterable<T> content,
Iterable<Link> links)
Creates a Resources instance with the given content and Links. |
|
Resources(Iterable<T> content,
Link... links)
Creates a Resources instance with the given content and Links (optional). |
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
|
|
Collection<T> |
getContent()
Returns the underlying elements. |
|
int |
hashCode()
|
|
Iterator<T> |
iterator()
|
|
String |
toString()
|
|
static
|
wrap(Iterable<S> content)
Creates a new Resources instance by wrapping the given domain class instances into a Resource. |
|
| Methods inherited from class org.springframework.hateoas.ResourceSupport |
|---|
add, add, getId, getLink, getLinks, hasLink, hasLinks, removeLinks |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Resources()
Resources instance.
public Resources(Iterable<T> content,
Link... links)
Resources instance with the given content and Links (optional).
content - must not be null.links - the links to be added to the Resources.
public Resources(Iterable<T> content,
Iterable<Link> links)
Resources instance with the given content and Links.
content - must not be null.links - the links to be added to the Resources.| Method Detail |
|---|
public static <T extends Resource<S>,S> Resources<T> wrap(Iterable<S> content)
Resources instance by wrapping the given domain class instances into a Resource.
content - must not be null.
public Collection<T> getContent()
public Iterator<T> iterator()
iterator in interface Iterable<T>public String toString()
toString in class ResourceSupportpublic boolean equals(Object obj)
equals in class ResourceSupportpublic int hashCode()
hashCode in class ResourceSupport
|
Spring Hateoas | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||