Package uk.ac.ebi.utils.collections
Class OptionsMapWrapper
java.lang.Object
uk.ac.ebi.utils.collections.OptionsMapWrapper
- All Implemented Interfaces:
Map<String,,Object> OptionsMap
An implementation of
OptionsMap that is simply based on the delegator pattern
and forwards all its operations to an underlining Map.- Author:
- brandizi
- Date:
- 16 Sep 2020
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an options map with an emptyHashMapas its base.OptionsMapWrapper(Map<String, Object> base) OptionsMapWrapper(Properties base) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()computeIfAbsent(String key, Function<? super String, ? extends Object> mappingFunction) computeIfPresent(String key, BiFunction<? super String, ? super Object, ? extends Object> remappingFunction) booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanvoidforEach(BiConsumer<? super String, ? super Object> action) getOrDefault(Object key, Object defaultValue) inthashCode()booleanisEmpty()keySet()merge(String key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) voidputIfAbsent(String key, Object value) booleanbooleanvoidreplaceAll(BiFunction<? super String, ? super Object, ? extends Object> function) intsize()toString()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.ebi.utils.collections.OptionsMap
getBoolean, getBoolean, getDouble, getDouble, getInt, getInt, getLong, getLong, getOpt, getOpt, getOpt, getOpt, getString, getString
-
Constructor Details
-
OptionsMapWrapper
public OptionsMapWrapper()Creates an options map with an emptyHashMapas its base. -
OptionsMapWrapper
-
OptionsMapWrapper
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<String,Object>
-
forEach
-
replaceAll
- Specified by:
replaceAllin interfaceMap<String,Object>
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceMap<String,Object>
-
remove
-
replace
-
replace
-
computeIfAbsent
public Object computeIfAbsent(String key, Function<? super String, ? extends Object> mappingFunction) - Specified by:
computeIfAbsentin interfaceMap<String,Object>
-
computeIfPresent
public Object computeIfPresent(String key, BiFunction<? super String, ? super Object, ? extends Object> remappingFunction) - Specified by:
computeIfPresentin interfaceMap<String,Object>
-
compute
-
merge
-
toString
-