Class ConcurrentRefValueIntObjectHashMap<V>
- java.lang.Object
-
- com.strobel.collections.concurrent.ConcurrentRefValueIntObjectHashMap<V>
-
- All Implemented Interfaces:
ConcurrentIntObjectMap<V>
- Direct Known Subclasses:
ConcurrentWeakIntObjectHashMap
abstract class ConcurrentRefValueIntObjectHashMap<V> extends java.lang.Object implements ConcurrentIntObjectMap<V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
ConcurrentRefValueIntObjectHashMap.IntReference<V>
-
Field Summary
Fields Modifier and Type Field Description private ConcurrentIntObjectHashMap<ConcurrentRefValueIntObjectHashMap.IntReference<V>>
_map
private java.lang.ref.ReferenceQueue<V>
_queue
-
Constructor Summary
Constructors Constructor Description ConcurrentRefValueIntObjectHashMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description V
addOrGet(int key, V value)
void
clear()
boolean
contains(int key)
protected abstract ConcurrentRefValueIntObjectHashMap.IntReference<V>
createReference(int key, V value, java.lang.ref.ReferenceQueue<V> queue)
java.lang.Iterable<IntObjectEntry<V>>
entries()
V
get(int key)
boolean
isEmpty()
int[]
keys()
private void
processQueue()
V
put(int key, V value)
V
putIfAbsent(int key, V value)
V
remove(int key)
boolean
remove(int key, V value)
boolean
replace(int key, V oldValue, V newValue)
int
size()
-
-
-
Field Detail
-
_map
private final ConcurrentIntObjectHashMap<ConcurrentRefValueIntObjectHashMap.IntReference<V>> _map
-
_queue
private final java.lang.ref.ReferenceQueue<V> _queue
-
-
Method Detail
-
createReference
protected abstract ConcurrentRefValueIntObjectHashMap.IntReference<V> createReference(int key, @NotNull V value, java.lang.ref.ReferenceQueue<V> queue)
-
processQueue
private void processQueue()
-
addOrGet
@NotNull public V addOrGet(int key, @NotNull V value)
- Specified by:
addOrGet
in interfaceConcurrentIntObjectMap<V>
-
putIfAbsent
public V putIfAbsent(int key, @NotNull V value)
- Specified by:
putIfAbsent
in interfaceConcurrentIntObjectMap<V>
-
remove
public boolean remove(int key, @NotNull V value)
- Specified by:
remove
in interfaceConcurrentIntObjectMap<V>
-
replace
public boolean replace(int key, @NotNull V oldValue, @NotNull V newValue)
- Specified by:
replace
in interfaceConcurrentIntObjectMap<V>
-
put
public V put(int key, @NotNull V value)
- Specified by:
put
in interfaceConcurrentIntObjectMap<V>
-
get
public V get(int key)
- Specified by:
get
in interfaceConcurrentIntObjectMap<V>
-
remove
public V remove(int key)
- Specified by:
remove
in interfaceConcurrentIntObjectMap<V>
-
size
public int size()
- Specified by:
size
in interfaceConcurrentIntObjectMap<V>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceConcurrentIntObjectMap<V>
-
contains
public boolean contains(int key)
- Specified by:
contains
in interfaceConcurrentIntObjectMap<V>
-
clear
public void clear()
- Specified by:
clear
in interfaceConcurrentIntObjectMap<V>
-
keys
@NotNull public int[] keys()
- Specified by:
keys
in interfaceConcurrentIntObjectMap<V>
-
entries
@NotNull public java.lang.Iterable<IntObjectEntry<V>> entries()
- Specified by:
entries
in interfaceConcurrentIntObjectMap<V>
-
-