From f102e69fe8920f6a13d08a37522fc27fa3c5a858 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Thu, 30 Jul 2020 22:40:09 +0200 Subject: [PATCH] [New] Added Activity.getAction() and .getActivity() --- .../li/strolch/model/activity/Activity.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/li.strolch.model/src/main/java/li/strolch/model/activity/Activity.java b/li.strolch.model/src/main/java/li/strolch/model/activity/Activity.java index 2c5fb5014..5c8a87a4c 100644 --- a/li.strolch.model/src/main/java/li/strolch/model/activity/Activity.java +++ b/li.strolch.model/src/main/java/li/strolch/model/activity/Activity.java @@ -203,6 +203,30 @@ public class Activity extends AbstractStrolchRootElement return (T) element; } + /** + * Returns the {@link Action} with the given ID which is a direct child of this {@link Activity} + * + * @param id + * the id of the {@link Action} to return + * + * @return the {@link Action} with the given ID + */ + public Action getAction(String id) { + return getElement(id); + } + + /** + * Returns the {@link Activity} with the given ID which is a direct child of this {@link Activity} + * + * @param id + * the id of the {@link Activity} to return + * + * @return the {@link Activity} with the given ID + */ + public Activity getActivity(String id) { + return getElement(id); + } + /** * get {@code IActivityElement} by id *