#64 - Extended support for PagedResources.
Changed Relation type to identify previous links to standardized value of prev. Added integration tests for HAL rendering of PagedResources.
This commit is contained in:
@@ -87,6 +87,16 @@ public class Links implements Iterable<Link> {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the {@link Links} container contains a {@link Link} with the given rel.
|
||||
*
|
||||
* @param rel
|
||||
* @return
|
||||
*/
|
||||
public boolean hasLink(String rel) {
|
||||
return getLink(rel) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link Links} instance from the given RFC5988-compatible link format.
|
||||
*
|
||||
@@ -114,6 +124,15 @@ public class Links implements Iterable<Link> {
|
||||
return new Links(links);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the {@link Links} containter is empty.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isEmpty() {
|
||||
return links.isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
|
||||
Reference in New Issue
Block a user