org.jasig.portal.services.persondir.support.merger
Class ReplacingAttributeAdder

java.lang.Object
  extended by org.jasig.portal.services.persondir.support.merger.ReplacingAttributeAdder
All Implemented Interfaces:
IAttributeMerger

public class ReplacingAttributeAdder
extends java.lang.Object
implements IAttributeMerger

Attribute merge strategy whereby considered attributes over-write previously set values for attributes with colliding names.

Version:
$Revision: 1.2 $ $Date: 2004/12/13 23:27:38 $
Author:
andrew.petro@yale.edu

Constructor Summary
ReplacingAttributeAdder()
           
 
Method Summary
 java.util.Map mergeAttributes(java.util.Map toModify, java.util.Map toConsider)
          Simply puts all the values in toConsider into toModify and returns toModify.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplacingAttributeAdder

public ReplacingAttributeAdder()
Method Detail

mergeAttributes

public java.util.Map mergeAttributes(java.util.Map toModify,
                                     java.util.Map toConsider)
Simply puts all the values in toConsider into toModify and returns toModify. This means that for keys in both toConsider and toModify, the value in toConsider will be controlling.

Specified by:
mergeAttributes in interface IAttributeMerger
Parameters:
toModify - - the Map we are to modify
toConsider - - the Map we are to consider in modifying toModify
Returns:
the result of toModify.putAll(toConsider)