mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-06 19:51:40 +00:00
24 lines
563 B
Java
24 lines
563 B
Java
|
|
package com.cappielloantonio.play.util;
|
||
|
|
|
||
|
|
import com.cappielloantonio.play.model.Queue;
|
||
|
|
import com.cappielloantonio.play.model.Song;
|
||
|
|
|
||
|
|
import java.util.ArrayList;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
public class QueueUtil {
|
||
|
|
public static Queue getQueueElementFromSong(Song song) {
|
||
|
|
return new Queue(song.getId());
|
||
|
|
}
|
||
|
|
|
||
|
|
public static List<Queue> getQueueElementsFromSongs(List<Song> songs) {
|
||
|
|
List<Queue> queue = new ArrayList<>();
|
||
|
|
|
||
|
|
for(Song song: songs) {
|
||
|
|
queue.add(new Queue(song.getId()));
|
||
|
|
}
|
||
|
|
|
||
|
|
return queue;
|
||
|
|
}
|
||
|
|
}
|