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
ConstructorsConstructorDescriptionOptionUnpackingMap(ConcurrentMap<K, io.atlassian.fugue.Option<V>> mapWithOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleaninthashCode()booleanisEmpty()keySet()voidputIfAbsent(K key, V value) booleanbooleanintsize()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
OptionUnpackingMap
-
-
Method Details
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode()
-