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
ConstructorDescriptionCreates an options map with an emptyHashMap
as its base.OptionsMapWrapper
(Map<String, Object> base) OptionsMapWrapper
(Properties base) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
computeIfAbsent
(String key, Function<? super String, ? extends Object> mappingFunction) computeIfPresent
(String key, BiFunction<? super String, ? super Object, ? extends Object> remappingFunction) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
void
forEach
(BiConsumer<? super String, ? super Object> action) getOrDefault
(Object key, Object defaultValue) int
hashCode()
boolean
isEmpty()
keySet()
merge
(String key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) void
putIfAbsent
(String key, Object value) boolean
boolean
void
replaceAll
(BiFunction<? super String, ? super Object, ? extends Object> function) int
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 emptyHashMap
as its base. -
OptionsMapWrapper
-
OptionsMapWrapper
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<String,
Object>
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
Object>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<String,
Object>
-
forEach
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<String,
Object>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<String,
Object>
-
remove
-
replace
-
replace
-
computeIfAbsent
public Object computeIfAbsent(String key, Function<? super String, ? extends Object> mappingFunction) - Specified by:
computeIfAbsent
in interfaceMap<String,
Object>
-
computeIfPresent
public Object computeIfPresent(String key, BiFunction<? super String, ? super Object, ? extends Object> remappingFunction) - Specified by:
computeIfPresent
in interfaceMap<String,
Object>
-
compute
-
merge
-
toString
-