Added little method like the addToDoubleInMap to do addToListInMap
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@569749 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -350,6 +350,15 @@ public class UtilMisc {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void addToListInMap(Object element, Map theMap, Object listKey) {
|
||||
List theList = (List) theMap.get(listKey);
|
||||
if (theList == null) {
|
||||
theList = FastList.newInstance();
|
||||
theMap.put(listKey, theList);
|
||||
}
|
||||
theList.add(element);
|
||||
}
|
||||
|
||||
public static long toLong(Object value) {
|
||||
if (value != null) {
|
||||
if (value instanceof Long) {
|
||||
|
||||
Reference in New Issue
Block a user