package org.oransc.policyagent.repository;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
return t;
}
+ public synchronized PolicyType get(String name) {
+ return types.get(name);
+ }
+
public synchronized void put(PolicyType type) {
types.put(type.name(), type);
}
+ public synchronized boolean contains(String policyType) {
+ return types.containsKey(policyType);
+ }
+
+ public synchronized Collection<PolicyType> getAll() {
+ return Collections.unmodifiableCollection(types.values());
+ }
+
+ public synchronized int size() {
+ return types.size();
+ }
+
+ public synchronized void clear() {
+ this.types.clear();
+ }
}