+ public ConfigImpl(Class<T> aType, String aPrefix) {
+ notNull("type", aType);
+ notNull("id", aPrefix);
+ type = aType;
+ prefix = aPrefix;
+ registered = new HashMap<Id<T>, T>();
+ }
+
+ @Override
+ public Class<T> getType() {
+ return type;
+ }
+
+ /**
+ * Copies the config object.
+ *
+ * @param aConfig
+ * Config to copy.
+ */
+ public ConfigImpl(ConfigImpl<T> aConfig) {
+ notNull("config", aConfig);
+ prefix = aConfig.prefix;
+ registered = new HashMap<Id<T>, T>();
+ for (Map.Entry<Id<T>, T> entry : aConfig.registered.entrySet()) {
+ registered.put(entry.getKey(), entry.getValue());
+ }