OpMath

com.opmath.util.datastruct
Class InitializedHashtable

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--com.opmath.util.datastruct.InitializedHashtable
All Implemented Interfaces:
Cloneable, Map, Serializable

public class InitializedHashtable
extends Hashtable

A functional extension to java.util.Hashtable.

InitializedHashtable is a utility class, providing specialized Hashtable semantics.

The class extends Hashtable so as to to provide a constructor that populates the Hashtable. This is essential in the case, for example, of static final Hashtable valiables.

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SE 1.3
Version:
utilities-v011
Author:
Bruno Beloff bruno.beloff@opmath.com
See Also:
Serialized Form

Constructor Summary
InitializedHashtable(Object[] keys, Object[] values)
          Constructs a new InitializedHashtable instance.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, 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

InitializedHashtable

public InitializedHashtable(Object[] keys,
                            Object[] values)
                     throws ArrayStoreException,
                            ArrayIndexOutOfBoundsException

Constructs a new InitializedHashtable instance. The table is populated with a pair of arrays of type Object - one array suplying keys, the other the associated values.

Parameters:
keys - the Object[] supplying the keys.
values - the Object[] supplying the values.
Throws:
ArrayStoreException - An exception thrown if either parameter is nill.
ArrayIndexOutOfBoundsException - An exception thrown if the parameters are not of the same length.
Since:
J2SE 1.3

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK