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.Serializable
An implementation of
Map
that wraps anotherMap
and 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' aHashMap
that has the given initial capacity.DirtyFlagMap(int initialCapacity, float loadFactor)
Create a DirtyFlagMap that 'wraps' aHashMap
that has the given initial capacity and load factor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
clearDirtyFlag()
Clear the 'dirty' flag (set dirty flag tofalse
).java.lang.Object
clone()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object val)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object obj)
V
get(java.lang.Object key)
java.util.Map<K,V>
getWrappedMap()
Get a direct handle to the underlying Map.int
hashCode()
boolean
isDirty()
Determine whether theMap
is flagged dirty.boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V val)
void
putAll(java.util.Map<? extends K,? extends V> t)
V
remove(java.lang.Object key)
int
size()
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
HashMap
that has the given initial capacity.- See Also:
HashMap
-
DirtyFlagMap
public DirtyFlagMap(int initialCapacity, float loadFactor)
Create a DirtyFlagMap that 'wraps' a
HashMap
that 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
Map
is 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:
clone
in classjava.lang.Object
-
-