Adds Comparable to allow compile under JDK7

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1417321 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lukasz Lenart
2012-12-05 09:08:10 +00:00
parent d5108840a5
commit 87feb01fd6
@@ -24,7 +24,8 @@ package org.apache.struts2.sitegraph.entities;
/**
*/
public class Target {
public class Target implements Comparable<Target> {
private String target;
private int type;
@@ -59,4 +60,13 @@ public class Target {
result = 29 * result + type;
return result;
}
public int compareTo(Target o) {
if (o.target != null && target != null) {
return o.target.compareTo(target);
} else {
return 0;
}
}
}