arlut.csd.ganymede
Class GHashtable

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--arlut.csd.ganymede.GHashtable
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class GHashtable
extends java.util.Hashtable

GHashtable is a Hashtable subclass that can map uppercase/lowercase keys of the same string to identity. It does this by basically mapping all strings to the lowercase version internally. The case sensitivity of the hashtable is specified at hash creation time, and may not change thereafter.

This hashtable also has special support for handling arrays of Bytes as keys in the hash, using the IPwrap class for I.P. address representation.

See Also:
Serialized Form

Field Summary
private  boolean caseInsensitive
           
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
GHashtable(boolean caseInsensitive)
          Least specified constructor.
GHashtable(int initialCapacity, boolean caseInsensitive)
          Medium specified constructor.
GHashtable(int initialCapacity, float loadFactor, boolean caseInsensitive)
          Fully specified constructor.
 
Method Summary
 boolean containsKey(java.lang.Object key)
           
 java.lang.Object get(java.lang.Object key)
           
 java.util.Enumeration keys()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 java.lang.Object remove(java.lang.Object key)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsValue, elements, entrySet, equals, hashCode, isEmpty, keySet, putAll, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

caseInsensitive

private boolean caseInsensitive
Constructor Detail

GHashtable

public GHashtable(int initialCapacity,
                  float loadFactor,
                  boolean caseInsensitive)
Fully specified constructor.

Parameters:
initialCapacity - as for Hashtable
loadFactor - as for Hashtable
caseInsensitive - if true, lowercase and uppercase string keys will be mapped together
See Also:
Hashtable

GHashtable

public GHashtable(int initialCapacity,
                  boolean caseInsensitive)
Medium specified constructor.

Parameters:
initialCapacity - as for Hashtable
caseInsensitive - if true, lowercase and uppercase string keys will be mapped together
See Also:
Hashtable

GHashtable

public GHashtable(boolean caseInsensitive)
Least specified constructor.

Parameters:
caseInsensitive - if true, lowercase and uppercase string keys will be mapped together
See Also:
Hashtable
Method Detail

keys

public java.util.Enumeration keys()
Overrides:
keys in class java.util.Hashtable

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map
Overrides:
containsKey in class java.util.Hashtable

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Overrides:
get in class java.util.Hashtable

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.Hashtable

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map
Overrides:
remove in class java.util.Hashtable