Re: What is Wrong! Re: Implementing FcFs queue with J2SE 5.0



It's pretty hard for us to diagnose warnings when you haven't told us what
they are. In any case, it would probably be better for you to start a new
thread for this problem and to make the title reflect the new problem, e.g.
Compiler warnings from PriorityQueue.

Rhino


"Veikka" <veikka@xxxxxxxxxx> wrote in message
news:dp45br$nv2$1@xxxxxxxxxxxxxxxxxxxxx
>I found a following snippet in Web but it gives warnings.
> This should the PriorityQueue I need but there is something wrong....
>
> PriorityQueue <Priority> priorityQueue = new PriorityQueue(10,
> new Comparator<Priority>()
> {
> public int compare(Priority a, Priority b)
> {
> System.out.println("Comparing Populations");
> int populationA = a.getPopulation();
> int populationB = b.getPopulation();
> if (populationB > populationA)
> return 1;
> else if (populationB < populationA)
> return -1;
> else
> return 0;
> }
> }
> );
> }
>
>
> "Veikka" <veikka@xxxxxxxxxx> wrote in message
> news:dp3rsp$gti$1@xxxxxxxxxxxxxxxxxxxxx
>> Hello,
>>
>> J2SE 5.0 has a lot's of new classes considering multithreading.
>> What is the best class to implement queue in FirstComesFirstServed model?
>>
>> Any sample code arapund?
>>
>> Cheers!
>>
>>
>
>


.