From 684c412e9538d137b0db1337f38ab9d9a91c1675 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Wed, 29 Jan 2014 03:59:05 -0300 Subject: [PATCH] hasLabel method for mindmap --- .../src/main/java/com/wisemapping/model/Mindmap.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index a818b633..29333a6d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -317,4 +317,13 @@ public class Mindmap { return result; } + + public boolean hasLabel(@NotNull final String name) { + for (Label label : this.labels) { + if (label.getTitle().equals(name)) { + return true; + } + } + return false; + } }