Package org.apache.iceberg.util
Class CharSequenceMap<V>
java.lang.Object
org.apache.iceberg.util.CharSequenceMap<V>
- Type Parameters:
- V- the type of values
- All Implemented Interfaces:
- Serializable,- Map<CharSequence,- V> 
A map that uses char sequences as keys.
 
This implementation wraps provided keys into CharSequenceWrapper for consistent
 hashing and equals behavior. This ensures that objects of different types that represent the same
 sequence of characters are treated as equal keys in the map.
 
Note: This map is not designed for concurrent modification by multiple threads. However, it supports safe concurrent reads, assuming there are no concurrent writes.
Note: This map does not support null keys.
- See Also:
- 
Nested Class Summary
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()computeIfAbsent(CharSequence key, Supplier<V> valueSupplier) booleancontainsKey(Object key) booleancontainsValue(Object value) static <T> CharSequenceMap<T> create()entrySet()booleaninthashCode()booleanisEmpty()keySet()put(CharSequence key, V value) voidputAll(Map<? extends CharSequence, ? extends V> otherMap) intsize()toString()values()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Method Details- 
create
- 
sizepublic int size()- Specified by:
- sizein interface- Map<CharSequence,- V> 
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Map<CharSequence,- V> 
 
- 
containsKey- Specified by:
- containsKeyin interface- Map<CharSequence,- V> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<CharSequence,- V> 
 
- 
get- Specified by:
- getin interface- Map<CharSequence,- V> 
 
- 
put- Specified by:
- putin interface- Map<CharSequence,- V> 
 
- 
remove- Specified by:
- removein interface- Map<CharSequence,- V> 
 
- 
putAll- Specified by:
- putAllin interface- Map<CharSequence,- V> 
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Map<CharSequence,- V> 
 
- 
keySet- Specified by:
- keySetin interface- Map<CharSequence,- V> 
 
- 
values- Specified by:
- valuesin interface- Map<CharSequence,- V> 
 
- 
entrySet- Specified by:
- entrySetin interface- Map<CharSequence,- V> 
 
- 
computeIfAbsent
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-