Added a finder method.

This commit is contained in:
kebernet 2011-04-02 01:43:06 +00:00
parent 6967345621
commit 3505725a50

View file

@ -250,8 +250,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
boolean mediaEntry = false;
List links = getOtherLinks();
for (Iterator it = links.iterator(); it.hasNext();) {
Link link = (Link) it.next();
for (Iterator<Link> it = links.iterator(); it.hasNext();) {
Link link = it.next();
if ("edit-media".equals(link.getRel())) {
mediaEntry = true;
@ -560,4 +560,14 @@ public class Entry implements Cloneable, Serializable, Extendable {
public String toString() {
return _objBean.toString();
}
public Link findRelatedLink(String relation){
for(Link l : this._otherLinks){
if(relation.equals(l.getRel())){
return l;
}
}
return null;
}
}