*/
package org.wamblee.xmlrouter.config;
-import java.util.List;
+import java.util.Collection;
import org.wamblee.xmlrouter.common.Id;
* @param <T>
* Type for which ids are generated.
*/
-public interface Config<T> extends Identifiable<Config> {
-
+public interface Config<T extends Identifiable> extends Identifiable<Config> {
/**
* Adds an item. No item with the same id may exist.
*
* @param aT
* item
+ * @throws ConfigException
+ * In case an object with the same id already exists.
*/
void add(T aT);
/**
* @return All available items.
*/
- List<T> values();
+ Collection<T> values();
}
\ No newline at end of file