• Post Reply Bookmark Topic Watch Topic
  • New Topic

Specifying the order of a Queue  RSS feed

 
Kyle Kerlew
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class that plays songs in order based on their order in the directory they're in

What I want to make it do is whenever I play a certain song, I want it to remove all the songs BEFORE it from the queue so that it only plays the songs following

This is the class where the queues are created

 
Paul Clapham
Sheriff
Posts: 22835
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand. You only ever play the first song from the queue, as far as I can see, so your question doesn't seem to apply to anything in that code.

(Off topic: Why isn't your queue a Queue<File>? You have code converting File to a String when you add to the queue, and code converting a String to a File when you pop from the queue.)
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle Kerlew wrote:This is the class where the queues are created

I guess my question would be: Why are you using Queues? Seems like a common-or-garden List to me. But maybe I'm just being thick - or possibly, there's some other stuff you haven't told us.

Winston
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!