|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.placidus.util.MapHelper
public class MapHelper
Helper functions for Map
Constructor Summary | |
---|---|
MapHelper()
|
Method Summary | |
---|---|
static java.util.Map |
cloneMap(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
This method tries to clone given map with different methods: 1) checks if Cloneable interface is implemented, then clone will be called with reflection. 2) if Cloneable interface is not implemented, a new HashMap will be instantiated and filled by calling putAll with given map entries. |
static java.util.Map |
cloneMapNew(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
This method tries to clone given map by instantiating a new HashMap and filling by call of putAll with given map entries. |
static java.util.Map<? extends java.lang.Object,? extends java.lang.Object> |
getMapWithValues(java.lang.Object... obj)
Creates a new HashMap and fills it with given argruments. |
static boolean |
isMapModifiable(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
To check if given map is modifiable or not. |
static void |
putAll(java.lang.String keyPrefix,
java.util.Map<java.lang.String,? extends java.lang.Object> src,
java.util.Map<java.lang.String,java.lang.Object> dest)
To put all entries with keyPrefix at the begin of each keyname to destination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapHelper()
Method Detail |
---|
public static boolean isMapModifiable(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
map
- to check
public static java.util.Map cloneMap(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
map
- to clone
public static java.util.Map cloneMapNew(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
map
- to clone
HashMap
filled by putAll with values from given mappublic static void putAll(java.lang.String keyPrefix, java.util.Map<java.lang.String,? extends java.lang.Object> src, java.util.Map<java.lang.String,java.lang.Object> dest)
keyPrefix
- prefix for key at destinationsrc
- to read fromdest
- to put intopublic static java.util.Map<? extends java.lang.Object,? extends java.lang.Object> getMapWithValues(java.lang.Object... obj)
obj
- key or value, depends on even or odd attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |