I have this class:
public class Job {
private int priority;
private String name;
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public String getName() {
return name;
}
public void setName(Stirng name) {
this.name= name;
}
}
and I created some collection of it in the below variable:
List<Job> _jobs = ...
How can I sort the list by priority? (top of the list would be the highest priority value)
I found some reference in the internet but could not find a similar example.