org.jboss.portal.common.util
Class MapAdapters
java.lang.Object
org.jboss.portal.common.util.MapAdapters
public class MapAdapters
- extends java.lang.Object
A collection of various map adapters.
- Version:
- $Revision: 630 $
- Author:
- Julien Viet
|
Method Summary |
static
|
adapt(java.util.Map<K,V[]> adapted,
java.lang.Class<? extends V> type)
|
static java.util.Map<java.lang.String,java.lang.String> |
adapt(java.util.Map<java.lang.String,java.lang.String[]> adapted)
Adapt a Map map as a Map map. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapAdapters
public MapAdapters()
adapt
public static <K,V> java.util.Map<K,V> adapt(java.util.Map<K,V[]> adapted,
java.lang.Class<? extends V> type)
adapt
public static java.util.Map<java.lang.String,java.lang.String> adapt(java.util.Map<java.lang.String,java.lang.String[]> adapted)
Adapt a Map map as a Map map. The adapted map
must not contain null string array or zero lenght string array, if the map contains such values then the
map state is considered as not valid and IllegalStateException can be thrown when the adapted map
is used.
The adapted map is writable but does not accept null values for write operations. On a put operation
the adapted map will receive a put operation with a string array of length one containing the provided value.
- Parameters:
adapted - the adapted map
- Returns:
- the adapter
Copyright © 2008. All Rights Reserved.