1
So like I said in the title I need to order a LinkedList
of an object and these objects as a sort parameter.
Follows the code:
public LinkedList getOrderOfActivityCompletion() {
LinkedList<Activity> activityOrder = new LinkedList<>();
if (!activityList.isEmpty() && !times.isEmpty()) {
for (Activity a : activityList.values()) {
activityOrder.add(a);
}
} else {
throw new UnsupportedOperationException("Not supported yet.");
}
return activityOrder;
I need to do 2 (two) FOR to order this LinkedList
?
You can use the
Collections#sort
.– ptkato