public class StringMap extends AbstractMap implements Externalizable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected HashSet |
_entrySet |
protected boolean |
_ignoreCase |
protected org.openqa.jetty.util.StringMap.NullEntry |
_nullEntry |
protected Object |
_nullValue |
protected org.openqa.jetty.util.StringMap.Node |
_root |
protected Set |
_umEntrySet |
protected int |
_width |
| Constructor and Description |
|---|
StringMap()
Constructor.
|
StringMap(boolean ignoreCase)
Constructor.
|
StringMap(boolean ignoreCase,
int width)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
Set |
entrySet() |
Object |
get(Object key) |
Object |
get(String key) |
Map.Entry |
getEntry(byte[] key,
int offset,
int length)
Get a map entry by byte array key.
|
Map.Entry |
getEntry(char[] key,
int offset,
int length)
Get a map entry by char array key.
|
Map.Entry |
getEntry(String key,
int offset,
int length)
Get a map entry by substring 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) |
clone, containsValue, equals, hashCode, keySet, putAll, toString, valuesprotected int _width
protected org.openqa.jetty.util.StringMap.Node _root
protected boolean _ignoreCase
protected org.openqa.jetty.util.StringMap.NullEntry _nullEntry
protected Object _nullValue
protected HashSet _entrySet
protected Set _umEntrySet
public StringMap()
public StringMap(boolean ignoreCase)
ignoreCase - public StringMap(boolean ignoreCase,
int width)
ignoreCase - width - Width of hash tables, larger values are faster but
use more memory.public void setIgnoreCase(boolean ic)
ic - If true, the map is case insensitive for keys.public boolean isIgnoreCase()
public void setWidth(int width)
width - Width of hash tables, larger values are faster but
use more memory.public int getWidth()
public Object put(Object key, Object value)
put in interface Mapput in class AbstractMappublic Object get(Object key)
get in interface Mapget in class AbstractMappublic Map.Entry getEntry(String key, int offset, int length)
key - String containing the keyoffset - Offset of the key within the String.length - The length of the keypublic Map.Entry getEntry(char[] key, int offset, int length)
key - char array containing the keyoffset - Offset of the key within the array.length - The length of the keypublic Map.Entry getEntry(byte[] key, int offset, int length)
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 keypublic Object remove(Object key)
remove in interface Mapremove in class AbstractMappublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMappublic int size()
size in interface Mapsize in class AbstractMappublic boolean isEmpty()
isEmpty in interface MapisEmpty in class AbstractMappublic boolean containsKey(Object key)
containsKey in interface MapcontainsKey in class AbstractMappublic void clear()
clear in interface Mapclear in class AbstractMappublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2014. All rights reserved.