org.mortbay.util
public class StringMap extends AbstractMap implements Externalizable
Version: $Id: StringMap.java,v 1.13 2004/10/23 09:03:22 gregwilkins Exp $
Field Summary | |
---|---|
protected HashSet | _entrySet |
protected boolean | _ignoreCase |
protected StringMap.NullEntry | _nullEntry |
protected Object | _nullValue |
protected StringMap.Node | _root |
protected Set | _umEntrySet |
protected int | _width |
Constructor Summary | |
---|---|
StringMap() Constructor. | |
StringMap(boolean ignoreCase) Constructor. | |
StringMap(boolean ignoreCase, int width) Constructor. |
Method Summary | |
---|---|
void | clear() |
boolean | containsKey(Object key) |
Set | entrySet() |
Object | get(Object key) |
Object | get(String key) |
Entry | getEntry(String key, int offset, int length) Get a map entry by substring key. |
Entry | getEntry(char[] key, int offset, int length) Get a map entry by char array key. |
Entry | getEntry(byte[] key, int offset, int length) Get a map entry by byte array key. |
int | getWidth() |
boolean | isEmpty() |
boolean | isIgnoreCase() |
Object | put(Object key, Object value) |
Object | put(String key, Object value) |
void | readExternal(ObjectInput in) |
Object | remove(Object key) |
Object | remove(String key) |
void | setIgnoreCase(boolean ic) Set the ignoreCase attribute. |
void | setWidth(int width) Set the hash width. |
int | size() |
void | writeExternal(ObjectOutput out) |
Parameters: ignoreCase
Parameters: ignoreCase width Width of hash tables, larger values are faster but use more memory.
Parameters: key String containing the key offset Offset of the key within the String. length The length of the key
Returns: The Map.Entry for the key or null if the key is not in the map.
Parameters: key char array containing the key offset Offset of the key within the array. length The length of the key
Returns: The Map.Entry for the key or null if the key is not in the map.
Parameters: key byte array containing the key. A simple ASCII byte to char mapping is used. offset Offset of the key within the array. length The length of the key
Returns: The Map.Entry for the key or null if the key is not in the map.
Parameters: ic If true, the map is case insensitive for keys.
Parameters: width Width of hash tables, larger values are faster but use more memory.