You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- /// 判空工具类
- class EmptyUtil {
-
- /// 判断是否为空,object的类型可以为:String Map List
- static bool isEmpty(Object object) {
- if (null == object) return true;
- if (object is String && object.isEmpty) {
- return true;
- }
- if (object is List && object.isEmpty) {
- return true;
- }
-
- if (object is Map && object.isEmpty) {
- return true;
- }
- return false;
- }
- }
|