public class DirtyFlagMap<K,V> extends Object implements Map<K,V>, Cloneable, Serializable
An implementation of Map that wraps another Map
and flags itself 'dirty' when it is modified.
| Constructor and Description |
|---|
DirtyFlagMap()
Create a DirtyFlagMap that 'wraps' a
HashMap. |
DirtyFlagMap(int initialCapacity)
Create a DirtyFlagMap that 'wraps' a
HashMap that has the
given initial capacity. |
DirtyFlagMap(int initialCapacity,
float loadFactor)
Create a DirtyFlagMap that 'wraps' a
HashMap that has the
given initial capacity and load factor. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
clearDirtyFlag()
Clear the 'dirty' flag (set dirty flag to
false). |
Object |
clone() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object val) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object obj) |
V |
get(Object key) |
Map<K,V> |
getWrappedMap()
Get a direct handle to the underlying Map.
|
int |
hashCode() |
boolean |
isDirty()
Determine whether the
Map is flagged dirty. |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V val) |
void |
putAll(Map<? extends K,? extends V> t) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
public DirtyFlagMap()
Create a DirtyFlagMap that 'wraps' a HashMap.
HashMappublic DirtyFlagMap(int initialCapacity)
Create a DirtyFlagMap that 'wraps' a HashMap that has the
given initial capacity.
HashMappublic DirtyFlagMap(int initialCapacity,
float loadFactor)
Create a DirtyFlagMap that 'wraps' a HashMap that has the
given initial capacity and load factor.
HashMappublic void clearDirtyFlag()
Clear the 'dirty' flag (set dirty flag to false).
public boolean isDirty()
Determine whether the Map is flagged dirty.
public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object val)
containsValue in interface Map<K,V>public boolean equals(Object obj)
public int hashCode()
Copyright 2001-2019, Terracotta, Inc.