From fba2d3890d2c218ddc9f84c777d439a0939110a2 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Wed, 12 Feb 2020 15:00:11 +0100 Subject: [PATCH] [New] Added ObjectFilter.getOperation() --- .../utils/objectfilter/ObjectFilter.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/li.strolch.utils/src/main/java/li/strolch/utils/objectfilter/ObjectFilter.java b/li.strolch.utils/src/main/java/li/strolch/utils/objectfilter/ObjectFilter.java index d6f40f9bc..689dcf1f0 100644 --- a/li.strolch.utils/src/main/java/li/strolch/utils/objectfilter/ObjectFilter.java +++ b/li.strolch.utils/src/main/java/li/strolch/utils/objectfilter/ObjectFilter.java @@ -432,6 +432,23 @@ public class ObjectFilter { return element; } + /** + * Return the {@link Operation} for the given keys + * + * @param key + * the key under which it was registered + * @param objectKey + * the objectKey + * + * @return the {@link Operation} for the given keys + */ + public Operation getOperation(String key, Object objectKey) { + ObjectCache objectCache = this.cache.getElement(key, objectKey); + if (objectCache == null) + return null; + return objectCache.getOperation(); + } + /** * Return true if the element with the given key and objectKey exist *