org.jasig.services.persondir.support.merger
Class MultivaluedAttributeMerger
java.lang.Object
org.jasig.services.persondir.support.merger.BaseAdditiveAttributeMerger
org.jasig.services.persondir.support.merger.MultivaluedAttributeMerger
- All Implemented Interfaces:
- IAttributeMerger
public class MultivaluedAttributeMerger
- extends BaseAdditiveAttributeMerger
Merger that retains values from both maps. If a value exists for
a key in both maps the following is done:
- If both maps have a
List they are merged into a single List
- If one map has a
List and the other a single value the value is added to the List
- If both maps have a single value a
List is created from the two.
- Version:
- $Revision$ $Date$
- Author:
- Eric Dalquist
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultivaluedAttributeMerger
public MultivaluedAttributeMerger()
mergePersonAttributes
protected Map<String,List<Object>> mergePersonAttributes(Map<String,List<Object>> toModify,
Map<String,List<Object>> toConsider)
- Description copied from class:
BaseAdditiveAttributeMerger
- Modify the "toModify" argument in consideration of the "toConsider" argument. Return the resulting Map, which
may or may not be the same reference as the "toModify" argument. The modification performed is
implementation-specific -- implementations of this interface exist to perform some particular transformation on
the toModify argument given the toConsider argument.
- Specified by:
mergePersonAttributes in class BaseAdditiveAttributeMerger
- Parameters:
toModify - - modify this maptoConsider - - in consideration of this map
- Returns:
- the modified Map
Copyright © 2012 Jasig. All Rights Reserved.