From: David ‘Bombe’ Roden Date: Thu, 19 Apr 2012 13:04:13 +0000 (+0200) Subject: Add method to return a single artist. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1f783aa9e2f7cad0ab22c49c472211f7136dbb32;p=demoscenemusic.git Add method to return a single artist. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index a1888de..e6d58bf 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -153,6 +153,10 @@ public class DataManager { private final List artists = new ArrayList(); private Artist artist; + public Artist get() { + return artists.isEmpty() ? null : artists.get(0); + } + public List all() { return artists; }