Package org.quartz.utils
Class DirtyFlagMap<K,V>
- java.lang.Object
-
- org.quartz.utils.DirtyFlagMap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<K,V>
- Direct Known Subclasses:
StringKeyDirtyFlagMap
public class DirtyFlagMap<K,V> extends java.lang.Object implements java.util.Map<K,V>, java.lang.Cloneable, java.io.SerializableAn implementation of
Mapthat wraps anotherMapand flags itself 'dirty' when it is modified.- Author:
- James House
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DirtyFlagMap()Create a DirtyFlagMap that 'wraps' aHashMap.DirtyFlagMap(int initialCapacity)Create a DirtyFlagMap that 'wraps' aHashMapthat has the given initial capacity.DirtyFlagMap(int initialCapacity, float loadFactor)Create a DirtyFlagMap that 'wraps' aHashMapthat has the given initial capacity and load factor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclearDirtyFlag()Clear the 'dirty' flag (set dirty flag tofalse).java.lang.Objectclone()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object val)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object obj)Vget(java.lang.Object key)java.util.Map<K,V>getWrappedMap()Get a direct handle to the underlying Map.inthashCode()booleanisDirty()Determine whether theMapis flagged dirty.booleanisEmpty()java.util.Set<K>keySet()Vput(K key, V val)voidputAll(java.util.Map<? extends K,? extends V> t)Vremove(java.lang.Object key)intsize()java.util.Collection<V>values()
-
-
-
Constructor Detail
-
DirtyFlagMap
public DirtyFlagMap()
Create a DirtyFlagMap that 'wraps' a
HashMap.- See Also:
HashMap
-
DirtyFlagMap
public DirtyFlagMap(int initialCapacity)
Create a DirtyFlagMap that 'wraps' a
HashMapthat has the given initial capacity.- See Also:
HashMap
-
DirtyFlagMap
public DirtyFlagMap(int initialCapacity, float loadFactor)Create a DirtyFlagMap that 'wraps' a
HashMapthat has the given initial capacity and load factor.- See Also:
HashMap
-
-
Method Detail
-
clearDirtyFlag
public void clearDirtyFlag()
Clear the 'dirty' flag (set dirty flag to
false).
-
isDirty
public boolean isDirty()
Determine whether the
Mapis flagged dirty.
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object val)
-
equals
public boolean equals(java.lang.Object obj)
-
hashCode
public int hashCode()
-
values
public java.util.Collection<V> values()
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-