org.apache.xerces.util
public class SymbolHash extends Object
The hash code uses the same algorithm as SymbolTable class.
Version: $Id: SymbolHash.java,v 1.8 2004/02/24 23:15:53 mrglavas Exp $
Nested Class Summary | |
---|---|
protected static class | SymbolHash.Entry
This class is a key table entry. |
Field Summary | |
---|---|
protected SymbolHash.Entry[] | fBuckets Buckets. |
protected int | fNum Number of elements. |
protected int | fTableSize Default table size. |
Constructor Summary | |
---|---|
SymbolHash() Constructs a key table with the default size. | |
SymbolHash(int size)
Constructs a key table with a given size.
|
Method Summary | |
---|---|
void | clear()
Remove all key/value assocaition. |
Object | get(Object key)
Get the value associated with the given key.
|
int | getLength()
Get the number of key/value pairs stored in this table.
|
int | getValues(Object[] elements, int from)
Add all values to the given array. |
SymbolHash | makeClone()
Make a clone of this object. |
void | put(Object key, Object value)
Adds the key/value mapping to the key table. |
protected SymbolHash.Entry | search(Object key, int bucket) |
Parameters: size the size of the key table.
Parameters: key
Returns: the value associated with the given key.
Returns: the number of key/value pairs stored in this table.
Parameters: elements the array to store the elements from where to start store element in the array
Returns: number of elements copied to the array
Parameters: key value