com.pnpconsult.zeiterfassung.util
Class MapUtils

java.lang.Object
  extended bycom.pnpconsult.zeiterfassung.util.MapUtils

public class MapUtils
extends java.lang.Object

Version:
$Id: MapUtils.java,v 1.1 2004/03/27 12:29:30 powerpete Exp $
Author:
M. Petersen

Method Summary
static void putMulti(java.util.Map map, java.lang.Object key, java.lang.Object value, java.lang.Class clazz)
          Puts the value into a Collection identified by key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

putMulti

public static void putMulti(java.util.Map map,
                            java.lang.Object key,
                            java.lang.Object value,
                            java.lang.Class clazz)
Puts the value into a Collection identified by key. If the key contains no value, a new Collection is created, using the given clazz.

Parameters:
map - The Map, to put the value into.
key - The key, to get the Collection.
value - The value, to put into the Collection.
clazz - The Class of the Collection if it does not exist yet.
Throws:
java.lang.IllegalArgumentException - If an error occurs, such as:
  • The given Class is not a Collection.
  • The given Class is not accessible.
  • The map already contains a value for the given key, which is no Collection.


Copyright © 2003-2004 PNP Unternehmensberatung. All Rights Reserved.