Author: jleroux
Date: Thu Nov 26 15:42:46 2009
New Revision: 884598
URL:
http://svn.apache.org/viewvc?rev=884598&view=revLog:
Oops, I forgot to commit this file in r884545
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=884598&r1=884597&r2=884598&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java Thu Nov 26 15:42:46 2009
@@ -21,6 +21,7 @@
import java.sql.Timestamp;
import com.ibm.icu.util.Calendar;
import java.util.Collection;
+import java.util.Map;
import org.apache.commons.validator.EmailValidator;
@@ -201,6 +202,11 @@
return ((c == null) || (c.size() == 0));
}
+ /** Check whether map m is empty. */
+ public static <K,E> boolean isEmpty(Map<K,E> m) {
+ return ((m == null) || (m.size() == 0));
+ }
+
/** Check whether charsequence c is empty. */
public static <E> boolean isEmpty(CharSequence c) {
return ((c == null) || (c.length() == 0));