Sort a list by Strings order

Asked by At

I use List <ListIssues> list to store many objects like this:

public class ListIssues
{
    private long id;
    private String url;
    private String title;
    private String state;
    private String content;
    private String milestone;
    private String label;
    .......
}

I would like to sort the Objects based on the label.

First objects which contain label low to be first. Then Objects which contain label medium to be sorted into the list and etc. Is there any way to implement this?

The problem is that I can have several labels low and several labels medium. How I can compare them with sort?

0 Answers