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:
David E. Jones
2007-08-26 01:01:58 +00:00
parent b93aea10af
commit c7bfe4beb7
@@ -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) {