diff --git a/core/src/main/java/org/synyx/hera/core/PluginRegistry.java b/core/src/main/java/org/synyx/hera/core/PluginRegistry.java index 4208678..73023a7 100644 --- a/core/src/main/java/org/synyx/hera/core/PluginRegistry.java +++ b/core/src/main/java/org/synyx/hera/core/PluginRegistry.java @@ -123,4 +123,14 @@ public interface PluginRegistry, S> extends Iterable { * @return */ boolean contains(T plugin); + + + /** + * Returns whether the registry contains a {@link Plugin} matching the given + * delimiter. + * + * @param delimiter + * @return + */ + boolean hasPluginFor(S delimiter); } \ No newline at end of file diff --git a/core/src/main/java/org/synyx/hera/core/SimplePluginRegistry.java b/core/src/main/java/org/synyx/hera/core/SimplePluginRegistry.java index 052b438..fcfd5f0 100644 --- a/core/src/main/java/org/synyx/hera/core/SimplePluginRegistry.java +++ b/core/src/main/java/org/synyx/hera/core/SimplePluginRegistry.java @@ -248,6 +248,17 @@ public class SimplePluginRegistry, S> implements } + /* + * (non-Javadoc) + * + * @see org.synyx.hera.core.PluginRegistry#hasPluginFor(java.lang.Object) + */ + public boolean hasPluginFor(S delimter) { + + return null != getPluginFor(delimter); + } + + /* * (non-Javadoc) *