这是我的代码:
import java.util.List;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.bc.filter.SearchRequestService;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.search.SearchException;
import com.atlassian.jira.issue.search.SearchProvider;
import com.atlassian.jira.issue.search.SearchRequest;
import com.atlassian.jira.issue.search.SearchResults;
import com.atlassian.jira.web.bean.PagerFilter;
class IssueTest{
String id;
String type;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public IssueTest(String id,String type)
{
this.id = id;
this.type = type;
}
}
public class test {
/**
* @param args
*/
static List<IssueTest> issues;
public static void main(String[] args) {
// TODO Auto-generated method stub
test t = new test();
}
public test ()
{
IssueTest i = new IssueTest("B-1", "bug");
issues.add(i);
IssueTest j = new IssueTest("S-1", "story");
issues.add(j);
IssueTest k = new IssueTest("T-1", "task");
issues.add(k);
IssueTest l = new IssueTest("T-2", "task");
issues.add(l);
IssueTest m = new IssueTest("E-1", "epic");
issues.add(m);
IssueTest n = new IssueTest("E-2", "epic");
issues.add(n);
IssueTest o = new IssueTest("T-3", "task");
issues.add(o);
IssueTest p = new IssueTest("S-2", "story");
issues.add(p);
IssueTest q = new IssueTest("B-2", "bug");
issues.add(q);
IssueTest r = new IssueTest("B-3", "bug");
issues.add(r);
}
}
我想根据“类型”对这个列表进行排序。我想要所有对象的顺序 -任务然后错误然后故事然后史诗