Add method to check for existence of a value.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 14:00:25 +0000 (16:00 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 14:00:25 +0000 (16:00 +0200)
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java

index 7de5b5e..83f3cee 100644 (file)
@@ -40,6 +40,10 @@ public class DefaultBase implements Base {
                return id;
        }
 
+       protected boolean hasValue(String name) {
+               return attributes.containsKey(name);
+       }
+
        @SuppressWarnings({ "synthetic-access", "unchecked" })
        protected <T> Value<T> value(String name, Class<T> clazz) {
                if (!attributes.containsKey(name)) {