ArrayList cast to PriorityQueue + java -


I am having this problem that I have used the alarms in my entire program so far and now I need to do its functioning. Is also the priority queue.

So I made clear that I thought it was sorted like the priority question z = (priority question) x where the x array was in the list.

> In the runtime it provides an error that this is not possible.

Is there any easy way to do this work. I can not change the entire array list in the form of priority queue because after that I have to update all the tasks used ....

Do I always have a new priority line from the array list Item should be added or there is a better way ...

Thanks a lot ...

  priority question pq = new priority (); Pq.addAll (x);    

Comments