net.kwfgrid.gwes
Class ActivityTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<String,Activity>
          extended by net.kwfgrid.gwes.ActivityTable
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Activity>

public final class ActivityTable
extends Hashtable<String,Activity>

An activity table is an extended Hashtable with Activities as values and their corresponding activity instance identifiers as keys.

Version:
$Id: ActivityTable.java 1419 2010-11-01 14:12:17Z hoheisel $
Author:
Andreas Hoheisel (www.andreas-hoheisel.de)
See Also:
Serialized Form

Constructor Summary
ActivityTable()
           
 
Method Summary
 Activity get(String activityID)
          Returns the activity to which the specified activityID is mapped in this hashtable.
 Activity put(String activityID, Activity activity)
          Maps the specified activityID to the specified activity in this table.
 Activity remove(String activityID)
          Removes the activityID (and its corresponding activity) from this hashtable.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActivityTable

public ActivityTable()
Method Detail

put

public final Activity put(String activityID,
                          Activity activity)
Maps the specified activityID to the specified activity in this table. Neither the activityID nor the activity can be null.

Specified by:
put in interface Map<String,Activity>
Overrides:
put in class Hashtable<String,Activity>
Parameters:
activityID - The activity identifier
activity - The activity
Returns:
the previous activity of the specified activityID in this hashtable, or null if it did not have one.

get

public final Activity get(String activityID)
Returns the activity to which the specified activityID is mapped in this hashtable.

Parameters:
activityID - a activityID in the hashtable.
Returns:
the activity to which the activityID is mapped in this hashtable; null if the activityID is not mapped to any activity this hashtable.
Throws:
NullPointerException - if the activityID is null.
See Also:
put(String, Activity)

remove

public final Activity remove(String activityID)
Removes the activityID (and its corresponding activity) from this hashtable. This method does nothing if the activityID is not in the hashtable.

Parameters:
activityID - the activityID that needs to be removed.
Returns:
the activity to which the activityID had been mapped in this hashtable, or null if the activityID did not have a mapping.
Throws:
NullPointerException - if the activityID is null.


Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.