org.quartz.utils
Class DirtyFlagMap<K,V>

java.lang.Object
  extended by org.quartz.utils.DirtyFlagMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>
Direct Known Subclasses:
StringKeyDirtyFlagMap

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.

Author:
James House
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
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.
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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.


getWrappedMap

public Map<K,V> getWrappedMap()

Get a direct handle to the underlying Map.


clear

public void clear()
Specified by:
clear in interface Map<K,V>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V>

containsValue

public boolean containsValue(Object val)
Specified by:
containsValue in interface Map<K,V>

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map<K,V>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<K,V>
Overrides:
hashCode in class Object

get

public V get(Object key)
Specified by:
get in interface Map<K,V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<K,V>

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,V>

put

public V put(K key,
             V val)
Specified by:
put in interface Map<K,V>

putAll

public void putAll(Map<? extends K,? extends V> t)
Specified by:
putAll in interface Map<K,V>

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V>

size

public int size()
Specified by:
size in interface Map<K,V>

values

public Collection<V> values()
Specified by:
values in interface Map<K,V>

clone

public Object clone()
Overrides:
clone in class Object


Copyright 2001-2015, Terracotta, Inc.