java.lang.Object | |
↳ | org.apache.xerces.util.SymbolHash |
This class is an unsynchronized hash table primary used for String to Object mapping.
The hash code uses the same algorithm as SymbolTable class.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SymbolHash.Entry | This class is a key table entry. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
fBuckets | Buckets. | ||||||||||
fNum | Number of elements. | ||||||||||
fTableSize | Default table size. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a key table with the default size.
| |||||||||||
Constructs a key table with a given size.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Remove all key/value assocaition.
| |||||||||||
Get the value associated with the given key.
| |||||||||||
Get the number of key/value pairs stored in this table.
| |||||||||||
Add all values to the given array.
| |||||||||||
Make a clone of this object.
| |||||||||||
Adds the key/value mapping to the key table.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Number of elements.
Default table size.
Constructs a key table with the default size.
Constructs a key table with a given size.
size | the size of the key table. |
---|
Remove all key/value assocaition. This tries to save a bit of GC'ing by at least keeping the fBuckets array around.
Get the value associated with the given key.
Get the number of key/value pairs stored in this table.
Add all values to the given array. The array must have enough entry.
elements | the array to store the elements |
---|---|
from | where to start store element in the array |
Adds the key/value mapping to the key table. If the key already exists, the previous value associated with this key is overwritten by the new value.