So as I said in the title I need to sort a LinkedList
of an object and these objects as a sort parameter.
Follow 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
?