public class LiteStringMap<V> extends java.lang.Object implements java.util.Map, java.io.Externalizable, java.lang.Comparable, java.lang.Cloneable
Light weight String Keyed Map optimized for memory usage and garbage collection overhead. Uses parallel key and value arrays internally and does not create an object for each Map.Entry unless entrySet() is used. This is generally slower than HashMap unless key String objects are already interned. With '*IString' variations of methods a call with a known already interned String can operate as fast, and for smaller Maps faster, than HashMap (such as in the EntityFacade where field names come from an interned String in a FieldInfo object). This is most certainly not thread-safe.
Modifiers | Name | Description |
---|---|---|
static class |
LiteStringMap.EntrySetWrapper |
|
static class |
LiteStringMap.EntryWrapper |
|
static class |
LiteStringMap.KeyIterator |
|
static class |
LiteStringMap.KeySetWrapper |
|
static class |
LiteStringMap.ValueCollectionWrapper |
|
static class |
LiteStringMap.ValueIterator |
Constructor and description |
---|
LiteStringMap
() |
LiteStringMap
(int initialCapacity) |
LiteStringMap
(java.util.Map<java.lang.String, V> cloneMap) |
LiteStringMap
(java.util.Map<java.lang.String, V> cloneMap, java.util.Set<java.lang.String> skipKeys) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
clear() |
|
protected java.lang.Object |
clone() |
|
public LiteStringMap<V> |
cloneLite() |
|
public int |
compareTo(java.util.Map<java.lang.String, ? extends V> that) |
|
public boolean |
containsKey(java.lang.Object key) |
|
public boolean |
containsKeyIString(java.lang.String key) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public boolean |
containsKeyIString(java.lang.String key, int index) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public boolean |
containsValue(java.lang.Object value) |
|
public LiteStringMap<V> |
ensureCapacity(int capacity) |
|
public java.util.Set<Entry<java.lang.String, V>> |
entrySet() |
|
public boolean |
equals(java.lang.Object o) |
|
public int |
findIndex(java.lang.String keyOrig) |
|
public int |
findIndexIString(java.lang.String key) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public V |
get(java.lang.Object key) |
|
public V |
getByIString(java.lang.String key) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public V |
getByIString(java.lang.String key, int index) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public V |
getByString(java.lang.String key) |
|
public java.lang.String |
getKey(int index) |
|
public V |
getValue(int index) |
|
public int |
hashCode() |
|
public static java.lang.String |
internString(java.lang.String orig) |
|
public boolean |
isEmpty() |
|
public java.util.Set<java.lang.String> |
keySet() |
|
public V |
put(java.lang.String keyOrig, V value) |
|
public void |
putAll(java.util.Map<? extends java.lang.String, ? extends V> map) |
|
public void |
putAll(java.util.Map<? extends java.lang.String, ? extends V> map, java.util.Set<java.lang.String> skipKeys) |
|
public V |
putByIString(java.lang.String key, V value) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public V |
putByIString(java.lang.String key, V value, int index) For this method the String key must be non-null and interned (returned value from String.intern()) |
|
public void |
readExternal(java.io.ObjectInput in) |
|
public V |
remove(java.lang.Object key) |
|
public boolean |
removeAllKeys(java.util.Collection<?> collection) |
|
public boolean |
removeAllValues(java.util.Collection<?> collection) |
|
public boolean |
removeValue(java.lang.Object value) |
|
public int |
size() |
|
public java.lang.String |
toString() |
|
public LiteStringMap<V> |
useManualIndex() |
|
public java.util.Collection<V> |
values() |
|
public void |
writeExternal(java.io.ObjectOutput out) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
For this method the String key must be non-null and interned (returned value from String.intern())
For this method the String key must be non-null and interned (returned value from String.intern())
For this method the String key must be non-null and interned (returned value from String.intern())
For this method the String key must be non-null and interned (returned value from String.intern())
For this method the String key must be non-null and interned (returned value from String.intern())
For this method the String key must be non-null and interned (returned value from String.intern())
For this method the String key must be non-null and interned (returned value from String.intern())