|
|
@ -63,6 +63,17 @@ public class SimplePriorityQueue<T extends Ticket> implements IPriorityQueue<T> |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Der Fall 2 Tickets haben die gleiche HöchstPrio
|
|
|
|
for (int i = 0; i < size; i++) { |
|
|
|
if (prioDet.calculate(tickets[i]) == prioDet.calculate(tick) & !tickets[i].equals(tick)) { |
|
|
|
if (tick.getBeginOfTicket() != null && tickets[i].getBeginOfTicket() != null) { |
|
|
|
if (tick.getBeginOfTicket().after(tickets[i].getBeginOfTicket())) { |
|
|
|
tick = tickets[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
remove(tick); |
|
|
|
return tick; |
|
|
|
} |
|
|
|