git://wamblee.org
/
xmlrouter
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CompositeConfig tested.
[xmlrouter]
/
config
/
src
/
main
/
java
/
org
/
wamblee
/
xmlrouter
/
config
/
Config.java
diff --git
a/config/src/main/java/org/wamblee/xmlrouter/config/Config.java
b/config/src/main/java/org/wamblee/xmlrouter/config/Config.java
index 263b0b66bfe7c0fbad9087dc6c8b2de21462cbdd..e825f9fc1d29b3bf77c9e673e5ea6c91f992eb2c 100644
(file)
--- a/
config/src/main/java/org/wamblee/xmlrouter/config/Config.java
+++ b/
config/src/main/java/org/wamblee/xmlrouter/config/Config.java
@@
-15,7
+15,7
@@
*/
package org.wamblee.xmlrouter.config;
*/
package org.wamblee.xmlrouter.config;
-import java.util.
Map
;
+import java.util.
List
;
import org.wamblee.xmlrouter.common.Id;
import org.wamblee.xmlrouter.common.Id;
@@
-28,16
+28,16
@@
import org.wamblee.xmlrouter.common.Id;
* @param <T>
* Type for which ids are generated.
*/
* @param <T>
* Type for which ids are generated.
*/
-public interface Config<T> {
-
+public interface Config<T extends Identifiable> extends Identifiable<Config> {
/**
/**
- * Adds a
item
+ * Adds a
n item. No item with the same id may exist.
*
* @param aT
* item
*
* @param aT
* item
- * @return Unique id.
+ * @throws DuplicateException
+ * In case an object with the same id already exists.
*/
*/
-
Id<T>
add(T aT);
+
void
add(T aT);
/**
* Removes the item with a given id.
/**
* Removes the item with a given id.
@@
-49,7
+49,7
@@
public interface Config<T> {
boolean remove(Id<T> aId);
/**
boolean remove(Id<T> aId);
/**
- * @return All available i
d
s.
+ * @return All available i
tem
s.
*/
*/
-
Map<Id<T>, T> map
();
+
List<T> values
();
}
\ No newline at end of file
}
\ No newline at end of file