|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.collections.SimpleHashtable
public final class SimpleHashtable
This class implements a special purpose hashtable. It works like a
normal java.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()
Deprecated. Constructs a new, empty hashtable with a default capacity. |
|
SimpleHashtable(int initialCapacity)
Deprecated. Constructs a new, empty hashtable with the specified initial capacity. |
Method Summary | |
---|---|
void |
clear()
Deprecated. |
java.lang.Object |
get(java.lang.String key)
Deprecated. Returns the value to which the specified key is mapped in this hashtable ... the key isn't necessarily interned, though. |
java.lang.Object |
getInterned(java.lang.String key)
Deprecated. Returns the value to which the specified key is mapped in this hashtable. |
boolean |
hasMoreElements()
Deprecated. Used to view this as an enumeration; returns true if there are more keys to be enumerated. |
java.util.Enumeration |
keys()
Deprecated. Returns an enumeration of the keys in this hashtable. |
java.lang.Object |
nextElement()
Deprecated. Used to view this as an enumeration; returns the next key in the enumeration. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Deprecated. Maps the specified key to the specified
value in this hashtable. |
java.lang.Object |
remove(java.lang.Object key)
Deprecated. |
int |
size()
Deprecated. Returns the number of keys in this hashtable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleHashtable(int initialCapacity)
initialCapacity
- the initial capacity of the hashtable.public SimpleHashtable()
Method Detail |
---|
public void clear()
public int size()
public java.util.Enumeration keys()
Enumeration
public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
public java.lang.Object nextElement()
nextElement
in interface java.util.Enumeration
public java.lang.Object getInterned(java.lang.String key)
public java.lang.Object get(java.lang.String key)
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
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.
public java.lang.Object remove(java.lang.Object key)
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |