se.kmr.scam.editor.util.form
Class DefaultValueMap

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byse.kmr.scam.editor.util.form.DefaultValueMap
All Implemented Interfaces:
Cloneable, Map, Serializable

public class DefaultValueMap
extends Hashtable

This hashtable returns a default value for keys that does not exists.

Version:
$Revision: 1.5 $
Author:
Jöran
See Also:
Serialized Form
Created:
den 5 augusti 2002

Constructor Summary
DefaultValueMap(Object defaultValue)
          Constructor for the DefaultValueMap object
 
Method Summary
 Object get(Object key)
          Get the object associated with a key, if such exists.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultValueMap

public DefaultValueMap(Object defaultValue)
Constructor for the DefaultValueMap object

Parameters:
defaultValue - Description of the Parameter
Method Detail

get

public Object get(Object key)
Get the object associated with a key, if such exists.

Parameters:
key - the key value.
Returns:
if the object contains the key and the key is associated to a non-null value then return the associated object, otherwise the default value.


Copyright © 2003 SCAM. All Rights Reserved.