Package com.reign.kat.lib.voice.newvoice
Class PlaylistQueue
java.lang.Object
com.reign.kat.lib.voice.newvoice.PlaylistQueue
FIFO queue for RequestedTracks, which also supports shuffling and moving elements.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Clears the playlist.dequeue()Pops from the front of the queue.voidenqueue(RequestedTrack track) Add a RequestedTrack to the end of the queue.voidenqueueFront(RequestedTrack track) getQueue()voidmove(int a, int b) Moves the track at index a to index b.peek()Returns the next track without removing it from the queuevoidshuffle()Shuffles the queue randomly.intsize()
- 
Field Details- 
loader
- 
loopMode
 
- 
- 
Constructor Details- 
PlaylistQueue
 
- 
- 
Method Details- 
enqueueAdd a RequestedTrack to the end of the queue.- Parameters:
- track- Track to add.
 
- 
enqueueFront
- 
search
- 
dequeuePops from the front of the queue.- Returns:
- RequestedTrack which was first in the queue.
 
- 
peekReturns the next track without removing it from the queue
- 
getQueue
- 
shufflepublic void shuffle()Shuffles the queue randomly.
- 
moveMoves the track at index a to index b.- Parameters:
- a- Index to be moved.
- b- Index to move to.
- Throws:
- IndexOutOfBoundsException
 
- 
sizepublic int size()
- 
clearpublic void clear()Clears the playlist.
 
-