org.jasig.services.persondir.support.merger
Class NoncollidingAttributeAdder
java.lang.Object
org.jasig.services.persondir.support.merger.NoncollidingAttributeAdder
- All Implemented Interfaces:
- IAttributeMerger
public class NoncollidingAttributeAdder
- extends Object
- implements IAttributeMerger
Merger which implements accumulation of Map entries such that entries once
established are individually immutable.
- Version:
- $Revision: 2871 $ $Date: 2006-12-08 14:41:33 -0500 (Fri, 08 Dec 2006) $
- Author:
- andrew.petro@yale.edu
|
Method Summary |
Map |
mergeAttributes(Map toModify,
Map toConsider)
For entries in toConsider the keys of which are not keys in toModify,
adds the entry to toModify and returns toModify. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoncollidingAttributeAdder
public NoncollidingAttributeAdder()
mergeAttributes
public Map mergeAttributes(Map toModify,
Map toConsider)
- For entries in toConsider the keys of which are not keys in toModify,
adds the entry to toModify and returns toModify.
- Specified by:
mergeAttributes in interface IAttributeMerger
- Parameters:
toModify - - base Map the entries of which are considered here
to be immutable.toConsider - - Map to merge into toModify for all noncolliding keys.
- Returns:
- toModify with entries the intersection of our method arguments,
with preference given to toModify's existing entries for all key collisions.
Copyright © 1998-2007 Java Architectures Special Interest Group. All Rights Reserved.