Geometry
Class RegionSet

java.lang.Object
  |
  +--Geometry.RegionSet

public class RegionSet
extends java.lang.Object

Maintains a collection of Region objects.

Version:
Created 15 January 2003
Author:
Dan Tappan
See Also:
Region

Field Summary
private  java.util.Hashtable m_region_set
           
private  java.lang.String m_set_name
           
 
Constructor Summary
RegionSet(java.lang.String set_name)
          Creates an empty collection.
 
Method Summary
 void addRegion(Region region)
          Adds a Region to this collection.
 Region getRegion(java.lang.String region_name)
          Returns a Region from this collection.
 int getRegionCount()
          Returns the number of Regions in this collection.
 java.util.Enumeration getRegions()
          Returns a list of Regions in this collection.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_set_name

private java.lang.String m_set_name

m_region_set

private java.util.Hashtable m_region_set
Constructor Detail

RegionSet

public RegionSet(java.lang.String set_name)
Creates an empty collection.

Parameters:
set_name - - the collection name
Method Detail

addRegion

public void addRegion(Region region)
               throws java.lang.Exception
Adds a Region to this collection.

Parameters:
region - - the region
Throws:
java.lang.Exception - - if the region is already present in the collection

getRegion

public Region getRegion(java.lang.String region_name)
                 throws java.lang.Exception
Returns a Region from this collection.

Parameters:
region_name - - the region name
Returns:
the region
Throws:
java.lang.Exception - - if the region is not present in the collection

getRegions

public java.util.Enumeration getRegions()
Returns a list of Regions in this collection.

Returns:
the list

getRegionCount

public int getRegionCount()
Returns the number of Regions in this collection.

Returns:
the count

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the String representation
See Also:
Support.toPrettyString(java.lang.String)