From: David ‘Bombe’ Roden Date: Thu, 19 Apr 2012 14:00:25 +0000 (+0200) Subject: Add method to check for existence of a value. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9dc33f50de736f6d98c988c555ed4b14cd47c423;p=demoscenemusic.git Add method to check for existence of a value. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java index 7de5b5e..83f3cee 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java @@ -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 Value value(String name, Class clazz) { if (!attributes.containsKey(name)) {