diff --git a/src/main/java/org/springframework/hateoas/ResourceSupport.java b/src/main/java/org/springframework/hateoas/ResourceSupport.java
index 60db627c..d8b17ef4 100755
--- a/src/main/java/org/springframework/hateoas/ResourceSupport.java
+++ b/src/main/java/org/springframework/hateoas/ResourceSupport.java
@@ -54,6 +54,11 @@ public class ResourceSupport implements Identifiable {
this.links.add(link);
}
+ /**
+ * Adds all given {@link Link}s to the resource.
+ *
+ * @param links
+ */
public void add(Iterable links) {
Assert.notNull(links, "Given links must not be null!");
for (Link candidate : links) {
@@ -61,14 +66,30 @@ public class ResourceSupport implements Identifiable {
}
}
+ /**
+ * Returns whether the resource contains {@link Link}s at all.
+ *
+ * @return
+ */
public boolean hasLinks() {
return !this.links.isEmpty();
}
+ /**
+ * Returns whether the resource contains a {@link Link} with the given rel.
+ *
+ * @param rel
+ * @return
+ */
public boolean hasLink(String rel) {
return getLink(rel) != null;
}
+ /**
+ * Returns all {@link Link}s contained in this resource.
+ *
+ * @return
+ */
public List getLinks() {
return Collections.unmodifiableList(links);
}