T - the type of values to be stored in the map.public class CharSequenceObjectMap<T> extends Object
CharSequence keys and generic values.
The main advantage of this implementation is that it's tailored for CharSequence inputs, allowing for a more
memory-efficient and performant solution in specific use-cases.| Constructor and Description |
|---|
CharSequenceObjectMap(int capacity)
Constructs an empty map with the specified initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get(CharSequence cs)
Returns the value to which the specified key (cs) is mapped,
or
null if this map contains no mapping for the key. |
void |
put(CharSequence name,
T t)
Associates the specified value with the specified key (name) in this map.
|
public CharSequenceObjectMap(int capacity)
capacity - the initial capacity of the map.public void put(CharSequence name, T t)
name - key with which the specified value is to be associated.t - value to be associated with the specified key.IllegalStateException - if the map is full.public T get(CharSequence cs)
null if this map contains no mapping for the key.cs - the key whose associated value is to be returned.null if this map contains no mapping for the key.IllegalStateException - if the map is full.Copyright © 2024. All rights reserved.