* 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:
Oliver Gierke
2009-12-28 20:39:42 +00:00
parent 04a9aa4287
commit 273a0e169a
2 changed files with 21 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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)
*