* added method to determine whether the @PluginRegistry@ contains a @Plugin@ for the given delimiter
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8469 5a64d73e-33d6-4ccc-9058-23f8668ecac9
This commit is contained in:
@@ -123,4 +123,14 @@ public interface PluginRegistry<T extends Plugin<S>, S> extends Iterable<T> {
|
||||
* @return
|
||||
*/
|
||||
boolean contains(T plugin);
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether the registry contains a {@link Plugin} matching the given
|
||||
* delimiter.
|
||||
*
|
||||
* @param delimiter
|
||||
* @return
|
||||
*/
|
||||
boolean hasPluginFor(S delimiter);
|
||||
}
|
||||
@@ -248,6 +248,17 @@ public class SimplePluginRegistry<T extends Plugin<S>, 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)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user