org.apache.tomcat.util.collections
public final class SimpleHashtable extends Object implements Enumeration
Deprecated:
This class implements a special purpose hashtable. It works like a normaljava.util.Hashtable
except that: The overall result is that it's less expensive to use these in
performance-critical locations, in terms both of CPU and memory,
than java.util.Hashtable
instances. In this package
it makes a significant difference when normalizing attributes,
which is done for each start-element construct.
Constructor Summary | |
---|---|
SimpleHashtable(int initialCapacity)
Constructs a new, empty hashtable with the specified initial
capacity.
| |
SimpleHashtable()
Constructs a new, empty hashtable with a default capacity. |
Method Summary | |
---|---|
void | clear() |
Object | get(String key)
Returns the value to which the specified key is mapped in this
hashtable ... the key isn't necessarily interned, though. |
Object | getInterned(String key)
Returns the value to which the specified key is mapped in this hashtable. |
boolean | hasMoreElements()
Used to view this as an enumeration; returns true if there
are more keys to be enumerated. |
Enumeration | keys()
Returns an enumeration of the keys in this hashtable.
|
Object | nextElement()
Used to view this as an enumeration; returns the next key
in the enumeration. |
Object | put(Object key, Object value)
Maps the specified key to the specified
value in this hashtable. |
Object | remove(Object key) |
int | size()
Returns the number of keys in this hashtable.
|
Parameters: initialCapacity the initial capacity of the hashtable.
Returns: an enumeration of the keys in this hashtable.
See Also: Enumeration
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
.
The value can be retrieved by calling the get
method
with a key that is equal to the original key.
Returns: the number of keys in this hashtable.