Package com.db4o.collections
Class ActivatableHashMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- com.db4o.collections.ActivatableHashMap<K,V>
-
- All Implemented Interfaces:
ActivatableMap<K,V>,Activatable,java.io.Serializable,java.lang.Cloneable,java.util.Map<K,V>
public class ActivatableHashMap<K,V> extends java.util.HashMap<K,V> implements ActivatableMap<K,V>
extends HashMap with Transparent Activation and Transparent Persistence support- Since:
- 7.9
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActivatableHashMap()ActivatableHashMap(int initialCapacity)ActivatableHashMap(int initialCapacity, float loadFactor)ActivatableHashMap(java.util.Map<? extends K,? extends V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(ActivationPurpose purpose)Should be called by every reading field access of an object.voidbind(Activator activator)Called by db4o after the object instantiation.voidclear()java.lang.Objectclone()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object o)Vget(java.lang.Object key)inthashCode()booleanisEmpty()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(java.lang.Object key)intsize()java.util.Collection<V>values()-
Methods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
activate
public void activate(ActivationPurpose purpose)
Description copied from interface:ActivatableShould be called by every reading field access of an object.
The recommended implementation of this method is to callActivator.activate(ActivationPurpose)on theActivatorthat was previously passed toActivatable.bind(Activator).- Specified by:
activatein interfaceActivatable- Parameters:
purpose- Whereever this object is accessed to read or write. SeeActivationPurpose
-
bind
public void bind(Activator activator)
Description copied from interface:ActivatableCalled by db4o after the object instantiation. This method is called to bind the object to the current activator
The recommended implementation of this method is to store the passedActivatorin a transient field of the object.- Specified by:
bindin interfaceActivatable- Parameters:
activator- the Activator instance to bind
-
clear
public void clear()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
get
public V get(java.lang.Object key)
-
isEmpty
public boolean isEmpty()
-
keySet
public java.util.Set<K> keySet()
-
remove
public V remove(java.lang.Object key)
-
size
public int size()
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object o)
-
-