Add method to return a single artist.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 13:04:13 +0000 (15:04 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 13:04:13 +0000 (15:04 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java

index a1888de..e6d58bf 100644 (file)
@@ -153,6 +153,10 @@ public class DataManager {
                private final List<Artist> artists = new ArrayList<Artist>();
                private Artist artist;
 
+               public Artist get() {
+                       return artists.isEmpty() ? null : artists.get(0);
+               }
+
                public List<Artist> all() {
                        return artists;
                }