From 9dc33f50de736f6d98c988c555ed4b14cd47c423 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 19 Apr 2012 16:00:25 +0200 Subject: [PATCH] Add method to check for existence of a value. --- src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java | 4 ++++ 1 file changed, 4 insertions(+) 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)) { -- 2.7.4