package architectureTest; import java.util.HashMap; import java.util.Map; public class Companies { static private Companies theInstance = null; private Map<String, Company> companies = new HashMap<>(); private Companies() { } static public Companies getInstance() { if (theInstance == null) { theInstance = new Companies(); } return theInstance; } public Map<String, Company> getCompanies() { return companies; } }