Package com.atlassian.bamboo.util
Class OptionUnpackingMap<K,V>
java.lang.Object
com.atlassian.bamboo.util.OptionUnpackingMap<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,
,V> Map<K,
V>
This class provides an adapter between a Map containing Option values and a map providing direct nullable values.
It's meant to be used for Google nullable Caches, which do not have mutability. If you're planning on using it, make
sure you UT the method you're using! It says experimental in the annotation below!
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionOptionUnpackingMap
(ConcurrentMap<K, io.atlassian.fugue.Option<V>> mapWithOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
int
hashCode()
boolean
isEmpty()
keySet()
void
putIfAbsent
(K key, V value) boolean
boolean
int
size()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
OptionUnpackingMap
-
-
Method Details
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
replace
-
replace
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode()
-