package org.oransc.policyagent.repository;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+import java.util.Vector;
import org.oransc.policyagent.exceptions.ServiceException;
public class PolicyTypes {
- private Map<String, PolicyType> types = new HashMap<String, PolicyType>();
-
- public PolicyTypes() {
- }
+ private Map<String, PolicyType> types = new HashMap<>();
public synchronized PolicyType getType(String name) throws ServiceException {
PolicyType t = types.get(name);
}
public synchronized Collection<PolicyType> getAll() {
- return Collections.unmodifiableCollection(types.values());
+ return new Vector<>(types.values());
}
public synchronized int size() {