From 2e86dd7f715b8bbf0a15d90a61ccb06f0aaa0311 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Mon, 17 May 2021 21:21:55 +0200 Subject: [PATCH] [New] Added UserRep.hasProperty() --- .../java/li/strolch/privilege/model/UserRep.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java b/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java index 37b11d3d5..483c3855a 100644 --- a/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java +++ b/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java @@ -259,6 +259,18 @@ public class UserRep implements Serializable { return this.history; } + /** + * Returns true if the the given property exists + * + * @param key + * the property key to check + * + * @return true if the the given property exists + */ + public boolean hasProperty(String key) { + return this.properties.containsKey(key); + } + /** * Returns the property with the given key *