KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > theme > RegionSet


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.theme;
10
11 import java.util.Collections JavaDoc;
12 import java.util.HashMap JavaDoc;
13 import java.util.Map JavaDoc;
14 import java.util.Set JavaDoc;
15
16 /**
17  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
18  * @version $Revision: 1.2 $
19  */

20 public class RegionSet
21 {
22
23    private Map JavaDoc content;
24
25    public RegionSet()
26    {
27       content = new HashMap JavaDoc();
28    }
29
30    public Region getRegion(String JavaDoc name)
31    {
32       return (Region)content.get(name);
33    }
34
35    public void addRegion(Region region)
36    {
37       content.put(region.getName(), region);
38    }
39
40    public Set JavaDoc getRegionNames()
41    {
42       return Collections.unmodifiableSet(content.keySet());
43    }
44 }
45
Popular Tags