T - type of values stored in the mappublic class CharSequenceObjectMap<T> extends Object
CharSequence keys.
It uses open addressing with linear probing and stores key strings directly.
Not intended as a general-purpose replacement for HashMap,
but can be beneficial in performance-sensitive components where lookups on
CharSequence instances are frequent. This implementation is not
thread-safe.| Constructor and Description |
|---|
CharSequenceObjectMap(int capacity)
Creates a map with an initial table size that is the next power of two
greater than or equal to
capacity with a minimum of sixteen. |
| Modifier and Type | Method and Description |
|---|---|
T |
get(CharSequence cs)
Retrieve the value associated with a key.
|
void |
put(CharSequence name,
T t)
Store a value against a key.
|
public CharSequenceObjectMap(int capacity)
capacity with a minimum of sixteen.capacity - desired initial capacity before roundingpublic void put(CharSequence name, T t)
toString() value is stored
if it is not already present, replacing any existing mapping.name - the keyt - value to storeIllegalStateException - if no empty slot can be found after probingpublic T get(CharSequence cs)
cs - the key to search fornull if the key is absent or the map is
full and the key cannot be locatedIllegalStateException - if probing finds no empty slotCopyright © 2026 Chronicle Software Ltd. All rights reserved.