View Javadoc

1   /*
2    * $Id: CompanyRegistry.java 20896 2011-01-05 13:17:51Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.example.cep;
12  
13  import java.util.Collection;
14  import java.util.Collections;
15  import java.util.HashMap;
16  
17  /**
18   * A helper class to load and return the list of companies
19   * 
20   * @author etirelli
21   */
22  public class CompanyRegistry
23  {
24      public static Collection<Company> getCompanies()
25      {
26          HashMap<String, Company> companies = new HashMap<String, Company>();
27          companies.put("RHT", new Company("Red Hat Inc", "RHT"));
28          companies.put("JAVA", new Company("Sun Microsystems", "JAVA"));
29          companies.put("MSFT", new Company("Microsoft Corp", "MSFT"));
30          companies.put("ORCL", new Company("Oracle Corp", "ORCL"));
31          companies.put("SAP", new Company("SAP", "SAP"));
32          companies.put("GOOG", new Company("Google Inc", "GOOG"));
33          companies.put("YHOO", new Company("Yahoo! Inc", "YHOO"));
34          companies.put("IBM", new Company("IBM Corp", "IBM"));
35  
36          return Collections.unmodifiableCollection(companies.values());
37      }
38  }