Package com.gmt2001.datastore2.datatype
Class AbstractDatabaseMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
com.gmt2001.datastore2.datatype.AbstractDatabaseMap<K,V>
- All Implemented Interfaces:
AttachableDataType
,Serializable
,Cloneable
,Map<K,
V>
- Direct Known Subclasses:
PermissionMap
- Author:
- gmt2001
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
attach
(UpdatableRecord<?> record, int fieldIndex) Attaches thisAttachableDataType
to a record and field to mark when changedvoid
clear()
computeIfAbsent
(K key, Function<? super K, ? extends V> mappingFunction) void
putIfAbsent
(K key, V value) boolean
boolean
void
replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) Methods inherited from class java.util.HashMap
clone, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
AbstractDatabaseMap
public AbstractDatabaseMap()
-
-
Method Details
-
attach
Description copied from interface:AttachableDataType
Attaches thisAttachableDataType
to a record and field to mark when changed- Specified by:
attach
in interfaceAttachableDataType
- Parameters:
record
- the record whichis storing this mapfieldIndex
- the field index where this map is located in the record
-
clear
public void clear() -
put
-
putAll
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<K,
V> - Overrides:
putIfAbsent
in classHashMap<K,
V>
-
remove
-
replace
-
compute
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceMap<K,
V> - Overrides:
computeIfAbsent
in classHashMap<K,
V>
-
merge
-
remove
-
replace
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<K,
V> - Overrides:
replaceAll
in classHashMap<K,
V>
-