|
|
@ -16,7 +16,9 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package moe.nekojimi.chords; |
|
|
|
package moe.nekojimi.chords; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.LinkedList; |
|
|
|
import java.util.LinkedList; |
|
|
|
|
|
|
|
import java.util.PriorityQueue; |
|
|
|
import java.util.Queue; |
|
|
|
import java.util.Queue; |
|
|
|
import java.util.function.Consumer; |
|
|
|
import java.util.function.Consumer; |
|
|
|
|
|
|
|
|
|
|
@ -28,13 +30,13 @@ public class QueueManager implements Consumer<Song> |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
private Song restartingSong = null; |
|
|
|
private Song restartingSong = null; |
|
|
|
private final Queue<Song> jukeboxQueue; |
|
|
|
private final PriorityQueue<Song> jukeboxQueue = new PriorityQueue<>(); |
|
|
|
private Playlist playlist; |
|
|
|
private Playlist playlist; |
|
|
|
private MusicHandler handler; |
|
|
|
private MusicHandler handler; |
|
|
|
|
|
|
|
|
|
|
|
public QueueManager() |
|
|
|
public QueueManager() |
|
|
|
{ |
|
|
|
{ |
|
|
|
jukeboxQueue = new LinkedList<>(); |
|
|
|
// jukeboxQueue = new LinkedList<>();
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|