org.alfresco.util
Class PropertyMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by java.util.HashMap
          extended by org.alfresco.util.PropertyMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class PropertyMap
extends java.util.HashMap

Property map helper class.

This class can be used as a short hand when a class of type Map is required.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry, java.util.AbstractMap.SimpleImmutableEntry
 
Field Summary
static java.util.Map EMPTY_MAP
          A static empty map to us when having to deal with nulls
 
Constructor Summary
PropertyMap()
           
PropertyMap(int initialCapacity)
           
PropertyMap(int initialCapacity, float loadFactor)
           
 
Method Summary
static org.alfresco.util.Pair getBeforeAndAfterMapsForChanges(java.util.Map before, java.util.Map after)
          Utility method to remove unchanged entries from each map.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

EMPTY_MAP

public static final java.util.Map EMPTY_MAP
A static empty map to us when having to deal with nulls

Constructor Detail

PropertyMap

public PropertyMap(int initialCapacity,
                   float loadFactor)
See Also:
HashMap.HashMap(int, float)

PropertyMap

public PropertyMap(int initialCapacity)
See Also:
HashMap.HashMap(int)

PropertyMap

public PropertyMap()
See Also:
HashMap.HashMap()
Method Detail

getBeforeAndAfterMapsForChanges

public static org.alfresco.util.Pair getBeforeAndAfterMapsForChanges(java.util.Map before,
                                                                     java.util.Map after)
Utility method to remove unchanged entries from each map.

Parameters:
before - the properties before (may be null)
after - the properties after (may be null)
Returns:
Return a map of values that changed from before to after. The before value is first and the after value is second.
Since:
3.2


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.