Package io.ebeaninternal.json
Class ModifyAwareMap<K,V>
- java.lang.Object
-
- io.ebeaninternal.json.ModifyAwareMap<K,V>
-
- All Implemented Interfaces:
ModifyAwareOwner
,Serializable
,Map<K,V>
public class ModifyAwareMap<K,V> extends Object implements Map<K,V>, ModifyAwareOwner
Map that is wraps an underlying map for the purpose of detecting changes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModifyAwareMap(ModifyAwareOwner owner, Map<K,V> underlying)
ModifyAwareMap(Map<K,V> underlying)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<K,V>>
entrySet()
boolean
equals(Object o)
V
get(Object key)
int
hashCode()
boolean
isEmpty()
boolean
isMarkedDirty()
Return true if the value is considered dirty.Set<K>
keySet()
void
markAsModified()
Marks the object as modified.V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> m)
V
remove(Object key)
void
resetMarkedDirty()
Reset the dirty state to clean.int
size()
String
toString()
Collection<V>
values()
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
ModifyAwareMap
public ModifyAwareMap(Map<K,V> underlying)
-
ModifyAwareMap
public ModifyAwareMap(ModifyAwareOwner owner, Map<K,V> underlying)
-
-
Method Detail
-
hashCode
public int hashCode()
-
isMarkedDirty
public boolean isMarkedDirty()
Description copied from interface:ModifyAwareOwner
Return true if the value is considered dirty. Note that this resets the dirty status back to clean.- Specified by:
isMarkedDirty
in interfaceModifyAwareOwner
-
markAsModified
public void markAsModified()
Description copied from interface:ModifyAwareOwner
Marks the object as modified.- Specified by:
markAsModified
in interfaceModifyAwareOwner
-
resetMarkedDirty
public void resetMarkedDirty()
Description copied from interface:ModifyAwareOwner
Reset the dirty state to clean.- Specified by:
resetMarkedDirty
in interfaceModifyAwareOwner
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<K,V>
-
-