Class ConcurrentIntIntMapView
ConcurrentMap view over ConcurrentIntIntMap.
Preserves the historical protected ConcurrentMap<Integer,Integer>
surface on ATN.LL1Table for subclasses and tests, while the
prediction hot path reads/writes the primitive map without boxing. Mutating
this view updates the same underlying store.
Entry, key, and value views are backed by the live primitive store:
size(), isEmpty(), entrySet(), AbstractMap.keySet(),
and AbstractMap.values() stay consistent with each other. Iterators walk an
immutable snapshot of the published COW table (weakly consistent under
concurrent writers, matching typical concurrent-map expectations for
bulk views). Atomic single-key mutations
(put(java.lang.Integer, java.lang.Integer), putIfAbsent(java.lang.Integer, java.lang.Integer), remove(java.lang.Object), replace(java.lang.Integer, java.lang.Integer, java.lang.Integer))
delegate to monitor-guarded operations on ConcurrentIntIntMap.
Null keys and null values are rejected (NullPointerException),
matching ConcurrentHashMap and the LL(1)
domain (alternatives are always ≥ 1).
Package-private; not part of any public API surface. HPPC types never appear in this class's signatures.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classSnapshot iterator over interleaved key/value pairs.private final classLive entry-set view.private final classMap entry that writesConcurrentIntIntMapView.LiveEntry.setValue(java.lang.Integer)through to the primitive store.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ATNOwning ATN when this view isATN.LL1Table;nullfor standalone test instances.private final ConcurrentIntIntMapLazily created entry-set view. -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)privateConcurrentIntIntMapView(ATN atn, ConcurrentIntIntMap delegate) (package private)ConcurrentIntIntMapView(ConcurrentIntIntMap delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()putIfAbsent(Integer key, Integer value) booleanbooleanprivate static voidrequireKeyValue(Integer key, Integer value) intsize()private voidsyncDense(int packedKey, int alt) Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, keySet, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Field Details
-
delegate
-
atn
Owning ATN when this view isATN.LL1Table;nullfor standalone test instances. Dense LL(1) writes go throughATN.syncLl1Dense(int, int). -
entrySet
Lazily created entry-set view. Stateless wrapper overdelegate; safe to publish once.
-
-
Constructor Details
-
ConcurrentIntIntMapView
ConcurrentIntIntMapView(ConcurrentIntIntMap delegate) -
ConcurrentIntIntMapView
ConcurrentIntIntMapView(ATN atn) -
ConcurrentIntIntMapView
-
-
Method Details
-
syncDense
private void syncDense(int packedKey, int alt) -
get
-
put
-
remove
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<Integer,Integer> - Overrides:
containsKeyin classAbstractMap<Integer,Integer>
-
containsValue
- Specified by:
containsValuein interfaceMap<Integer,Integer> - Overrides:
containsValuein classAbstractMap<Integer,Integer>
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<Integer,Integer> - Specified by:
putIfAbsentin interfaceMap<Integer,Integer>
-
remove
-
replace
-
replace
-
entrySet
-
requireKeyValue
-